summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/netcmd/user.py
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python/samba/netcmd/user.py')
-rw-r--r--source4/scripting/python/samba/netcmd/user.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py
index 2beb008980..8d4b04a09e 100644
--- a/source4/scripting/python/samba/netcmd/user.py
+++ b/source4/scripting/python/samba/netcmd/user.py
@@ -36,9 +36,10 @@ from samba.netcmd import (
)
+
class cmd_user_add(Command):
"""Create a new user."""
- synopsis = "%prog user add <name> [<password>]"
+ synopsis = "%prog user add <username> [<password>] [options]"
takes_args = ["name", "password?"]
@@ -51,9 +52,10 @@ class cmd_user_add(Command):
net.set_password(name, creds.get_domain(), password, creds)
+
class cmd_user_delete(Command):
"""Delete a user."""
- synopsis = "%prog user delete <name>"
+ synopsis = "%prog user delete <username> [options]"
takes_args = ["name"]
@@ -67,6 +69,7 @@ class cmd_user_delete(Command):
raise CommandError("Failed to delete user %s: %s" % (name, msg))
+
class cmd_user_enable(Command):
"""Enables a user"""
@@ -99,10 +102,11 @@ class cmd_user_enable(Command):
print("Enabled user %s" % (username or filter))
+
class cmd_user_setexpiry(Command):
"""Sets the expiration of a user account"""
- synopsis = "%prog user setexpiry <username> [options]"
+ synopsis = "%prog user setexpiry (<username>|--filter <filter>) [options]"
takes_options = [
Option("-H", help="LDB URL for database or target server", type=str),
@@ -139,7 +143,7 @@ class cmd_user_setexpiry(Command):
class cmd_user_setpassword(Command):
"""(Re)sets the password of a user account"""
- synopsis = "%prog user setpassword [username] [options]"
+ synopsis = "%prog user setpassword (<username>|--filter <filter>) [options]"
takes_options = [
Option("-H", help="LDB URL for database or target server", type=str),