summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/netcmd/newuser.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-04-08 12:19:51 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-04-08 12:21:35 +0200
commit479fd9c03fc84824fea310b76d48ce271587cfe7 (patch)
treeed7431c6dd2ce2578252d8f04a09fcf32a9472a6 /source4/scripting/python/samba/netcmd/newuser.py
parent2578072541e880c83089fdd278d81467e91ddc5a (diff)
downloadsamba-479fd9c03fc84824fea310b76d48ce271587cfe7.tar.gz
samba-479fd9c03fc84824fea310b76d48ce271587cfe7.tar.xz
samba-479fd9c03fc84824fea310b76d48ce271587cfe7.zip
s4-net: Simplify SamDB connect code.
Diffstat (limited to 'source4/scripting/python/samba/netcmd/newuser.py')
-rw-r--r--source4/scripting/python/samba/netcmd/newuser.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/netcmd/newuser.py b/source4/scripting/python/samba/netcmd/newuser.py
index 6f12de50e79..3815219460f 100644
--- a/source4/scripting/python/samba/netcmd/newuser.py
+++ b/source4/scripting/python/samba/netcmd/newuser.py
@@ -59,12 +59,7 @@ class cmd_newuser(Command):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
- if H is not None:
- url = H
- else:
- url = lp.get("sam database")
-
- samdb = SamDB(url=url, session_info=system_session(), credentials=creds,
+ samdb = SamDB(url=H, session_info=system_session(), credentials=creds,
lp=lp)
samdb.newuser(username, unixname, password,
force_password_change_at_next_login_req=must_change_at_next_login)