From c9bf7022fd9a20abf5d75bb7543f132203566ab8 Mon Sep 17 00:00:00 2001 From: Giampaolo Lauria Date: Fri, 15 Jul 2011 13:46:27 -0400 Subject: samba-tool: fixed synopsis on all "user" commands Added [options] where needed, fixed others where filter or username was needed, renamed name to username Signed-off-by: Andrew Tridgell --- source4/scripting/python/samba/netcmd/user.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4') 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 []" + synopsis = "%prog user add [] [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 " + synopsis = "%prog user delete [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 [options]" + synopsis = "%prog user setexpiry (|--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 (|--filter ) [options]" takes_options = [ Option("-H", help="LDB URL for database or target server", type=str), -- cgit