git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0770028
)
use a base64 encoded password when changing passwords
author
Andrew Tridgell
<tridge@samba.org>
Thu, 12 Mar 2009 04:20:25 +0000
(15:20 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 12 Mar 2009 04:20:25 +0000
(15:20 +1100)
This avoids problems with embedded control characters in password
changes
source4/scripting/python/samba/samdb.py
patch
|
blob
|
history
diff --git
a/source4/scripting/python/samba/samdb.py
b/source4/scripting/python/samba/samdb.py
index 1c5a8dfcde7592d12db77da8b7698d2721bc5de6..b92a91e2ef562a8cffa0004581a2331254bc3d6f 100644
(file)
--- a/
source4/scripting/python/samba/samdb.py
+++ b/
source4/scripting/python/samba/samdb.py
@@
-28,6
+28,7
@@
import ldb
from samba.idmap import IDmapDB
import pwd
import time
+import base64
__docformat__ = "restructuredText"
@@
-178,8
+179,8
@@
userAccountControl: %u
dn: %s
changetype: modify
replace: userPassword
-userPassword: %s
-""" % (user_dn,
password
)
+userPassword:
:
%s
+""" % (user_dn,
base64.b64encode(password)
)
self.modify_ldif(setpw)