summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-03-12 13:13:14 +1100
committerAndrew Tridgell <tridge@samba.org>2009-03-12 13:13:14 +1100
commit917905aea0cfeff53009839f70cdc9eefdcfa2c9 (patch)
tree43a08bb6ceeeaba05e1e77b6e716f8e3def0c6c1 /source4/scripting
parentc260bfa5d737d36e5701d00c55308dc1893b1e11 (diff)
downloadsamba-917905aea0cfeff53009839f70cdc9eefdcfa2c9.tar.gz
samba-917905aea0cfeff53009839f70cdc9eefdcfa2c9.tar.bz2
samba-917905aea0cfeff53009839f70cdc9eefdcfa2c9.zip
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'
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/samdb.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index 614970d3ec..740806f266 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -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)