1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-20 08:59:06 +03:00

removed leading spaces from embedded ldif

This fixes the problem with the setpassword command failing like this:
   Error: First line of ldif must be a dn not '    dn'
This commit is contained in:
Andrew Tridgell
2009-03-12 13:13:14 +11:00
parent c260bfa5d7
commit 917905aea0

View File

@ -175,10 +175,10 @@ userAccountControl: %u
user_dn = res[0].dn
setpw = """
dn: %s
changetype: modify
replace: userPassword
userPassword: %s
dn: %s
changetype: modify
replace: userPassword
userPassword: %s
""" % (user_dn, password)
self.modify_ldif(setpw)
@ -229,12 +229,12 @@ userAccountControl: %u
accountExpires = glue.unix2nttime(expiry_seconds + int(time.time()))
mod = """
dn: %s
changetype: modify
replace: userAccountControl
userAccountControl: %u
replace: accountExpires
accountExpires: %u
dn: %s
changetype: modify
replace: userAccountControl
userAccountControl: %u
replace: accountExpires
accountExpires: %u
""" % (res[0].dn, userAccountControl, accountExpires)
# now change the database
self.modify_ldif(mod)