diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-09 10:57:03 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-09 19:14:47 +0200 |
commit | b703481ef78b4f2234cf0d6c087c25fcbe3bd65c (patch) | |
tree | 0d75aaecea223ca5bd05cf799285a5b28f1763d4 | |
parent | cde9ec4af673a658777596f56dcba055458a4b35 (diff) | |
download | samba-b703481ef78b4f2234cf0d6c087c25fcbe3bd65c.tar.gz samba-b703481ef78b4f2234cf0d6c087c25fcbe3bd65c.tar.bz2 samba-b703481ef78b4f2234cf0d6c087c25fcbe3bd65c.zip |
s4:net utility - remove unixname parameter of samdb.newuser
We don't handle the id mapping stuff manually anymore.
-rw-r--r-- | source4/scripting/python/samba/netcmd/newuser.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source4/scripting/python/samba/netcmd/newuser.py b/source4/scripting/python/samba/netcmd/newuser.py index 64b6d1715c..0d400bf745 100644 --- a/source4/scripting/python/samba/netcmd/newuser.py +++ b/source4/scripting/python/samba/netcmd/newuser.py @@ -40,7 +40,6 @@ class cmd_newuser(Command): takes_options = [ Option("-H", help="LDB URL for database or target server", type=str), - Option("--unixname", help="Unix Username", type=str), Option("--must-change-at-next-login", help="Force password to be changed on next login", action="store_true"), @@ -49,21 +48,17 @@ class cmd_newuser(Command): takes_args = ["username", "password?"] def run(self, username, password=None, credopts=None, sambaopts=None, - versionopts=None, H=None, unixname=None, - must_change_at_next_login=None): + versionopts=None, H=None, must_change_at_next_login=None): if password is None: password = getpass("New Password: ") - if unixname is None: - unixname = username - lp = sambaopts.get_loadparm() creds = credopts.get_credentials(lp) try: - samdb = SamDB(url=H, session_info=system_session(), credentials=creds, - lp=lp) - samdb.newuser(username, unixname, password, + samdb = SamDB(url=H, session_info=system_session(), + credentials=creds, lp=lp) + samdb.newuser(username, password, force_password_change_at_next_login_req=must_change_at_next_login) except ldb.LdbError, (num, msg): print('Failed to create user "%s" : %s' % (username, msg)) |