setpassword python script
nathanieljp
nathanieljp at msn.com
Tue Mar 10 00:21:20 GMT 2009
Hello,
Please forgive me if this is the wrong place to post this.
I have used git to download (following the steps in
http://wiki.samba.org/index.php/Samba4/HOWTO), compile and install samba4 on
my laptop.
When I tried to set/change the password for a user via the
"samba-master/source4/setup/setpassword" script, I got this error: "Error:
First line of ldif must be a dn not ' dn'".
I don't know if its just my setup here, or if other people are coming across
the same error.
I took a look around the python source code and found the following in
samdb.py on lines 177->182:
setpw = """
dn: %s
changetype: modify
replace: userPassword
userPassword: %s
""" % (user_dn, password)
I then changed the lines to:
setpw = """
dn: %s
changetype: modify
replace: userPassword
userPassword: %s
""" % (user_dn, password)
Tested the python script and it now works.
OS: Linux 2.6.27-11-server #1 SMP Thu Jan 29 20:19:41 UTC 2009 i686
GNU/Linux
Samba: smbd version 4.0.0alpha8-GIT-bf85a14 started.
Error Reported by script: "samba-master/source4/setup/"
Modified Script location:
"/usr/local/samba/lib/python2.5/site-packages/samba"
Modified Script name: "samdb.py"
Please direct me to the correct place to post this if it was inappropriate
to post it here.
Nathaniel Jozef Przystupa
--
View this message in context: http://www.nabble.com/setpassword-python-script-tp22425652p22425652.html
Sent from the Samba - samba-technical mailing list archive at Nabble.com.
More information about the samba-technical
mailing list