mirror of
https://github.com/samba-team/samba.git
synced 2025-07-13 08:59:08 +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()
|
||||
creds = credopts.get_credentials(lp)
|
||||
|
||||
samdb = SamDB(url=H, session_info=system_session(), credentials=creds,
|
||||
lp=lp)
|
||||
try:
|
||||
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)
|
||||
except ldb.LdbError, (num, msg):
|
||||
|
Reference in New Issue
Block a user