From b26a4f6232219746fd8ed1b107476f3c23c6908e Mon Sep 17 00:00:00 2001 From: Theresa Halloran Date: Sun, 23 Oct 2011 15:23:28 -0700 Subject: s4: samba-tool subcommand rename - change samba-tool user add to samba-tool user create Signed-off-by: Theresa Halloran Signed-off-by: Jelmer Vernooij --- source4/scripting/python/samba/netcmd/user.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source4/scripting') 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 [] [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() -- cgit