mirror of
https://github.com/samba-team/samba.git
synced 2025-07-23 20:59:10 +03:00
s4-net: don't show a full python exception when you can't open sam.ldb
This commit is contained in:
@ -60,9 +60,9 @@ class cmd_newuser(Command):
|
|||||||
lp = sambaopts.get_loadparm()
|
lp = sambaopts.get_loadparm()
|
||||||
creds = credopts.get_credentials(lp)
|
creds = credopts.get_credentials(lp)
|
||||||
|
|
||||||
samdb = SamDB(url=H, session_info=system_session(), credentials=creds,
|
|
||||||
lp=lp)
|
|
||||||
try:
|
try:
|
||||||
|
samdb = SamDB(url=H, session_info=system_session(), credentials=creds,
|
||||||
|
lp=lp)
|
||||||
samdb.newuser(username, unixname, password,
|
samdb.newuser(username, unixname, password,
|
||||||
force_password_change_at_next_login_req=must_change_at_next_login)
|
force_password_change_at_next_login_req=must_change_at_next_login)
|
||||||
except ldb.LdbError, (num, msg):
|
except ldb.LdbError, (num, msg):
|
||||||
|
Reference in New Issue
Block a user