diff options
author | Theresa Halloran <thallora@linux.vnet.ibm.com> | 2011-10-23 15:23:28 -0700 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-10-23 15:23:28 -0700 |
commit | b26a4f6232219746fd8ed1b107476f3c23c6908e (patch) | |
tree | bdc2219ee8bb553ce67b4f315273bec10414c971 /source4/scripting/python | |
parent | aabda85a2fc9f6763abd56d61ff819012f2225ad (diff) | |
download | samba-b26a4f6232219746fd8ed1b107476f3c23c6908e.tar.gz samba-b26a4f6232219746fd8ed1b107476f3c23c6908e.tar.bz2 samba-b26a4f6232219746fd8ed1b107476f3c23c6908e.zip |
s4: samba-tool subcommand rename - change samba-tool user add to samba-tool user create
Signed-off-by: Theresa Halloran <thallora@linux.vnet.ibm.com>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/netcmd/user.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py index cbac5affbe..e10df21029 100644 --- a/source4/scripting/python/samba/netcmd/user.py +++ b/source4/scripting/python/samba/netcmd/user.py @@ -36,11 +36,17 @@ from samba.netcmd import ( ) -class cmd_user_add(Command): +class cmd_user_create(Command): """Creates a new user""" synopsis = "%prog <username> [<password>] [options]" + # take this print out after the add subcommand is removed. + # the add subcommand is deprecated but left in for now to allow people to migrate to create + if (len(sys.argv) > 2): + if ((sys.argv[2]) == 'add'): + print "\nNote: samba-tool user add is deprecated. Please use samba-tool user create for the same function.\n" + takes_options = [ Option("-H", "--URL", help="LDB URL for database or target server", type=str, metavar="URL", dest="H"), @@ -289,7 +295,8 @@ class cmd_user(SuperCommand): """User management""" subcommands = {} - subcommands["add"] = cmd_user_add() + subcommands["add"] = cmd_user_create() + subcommands["create"] = cmd_user_create() subcommands["delete"] = cmd_user_delete() subcommands["enable"] = cmd_user_enable() subcommands["setexpiry"] = cmd_user_setexpiry() |