mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
samba-tool domain classicupgrade: Print a better error when the ldap backend PW was not found
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
68f13f5d7e
commit
669c302f2d
@ -598,7 +598,10 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None,
|
|||||||
if samba3.lp.get("passdb backend").split(":")[0].strip() == "ldapsam":
|
if samba3.lp.get("passdb backend").split(":")[0].strip() == "ldapsam":
|
||||||
base_dn = samba3.lp.get("ldap suffix")
|
base_dn = samba3.lp.get("ldap suffix")
|
||||||
ldapuser = samba3.lp.get("ldap admin dn")
|
ldapuser = samba3.lp.get("ldap admin dn")
|
||||||
ldappass = (secrets_db.get_ldap_bind_pw(ldapuser)).strip('\x00')
|
ldappass = secrets_db.get_ldap_bind_pw(ldapuser)
|
||||||
|
if ldappass is None:
|
||||||
|
raise ProvisioningError("ldapsam passdb backend detected but no LDAP Bind PW found in secrets.tdb for user %s. Please point this tool at the secrets.tdb that was used by the previous installation.")
|
||||||
|
ldappass = ldappass.strip('\x00')
|
||||||
ldap = True
|
ldap = True
|
||||||
else:
|
else:
|
||||||
ldapuser = None
|
ldapuser = None
|
||||||
|
Loading…
Reference in New Issue
Block a user