diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-03-12 15:20:25 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-03-12 15:20:25 +1100 |
commit | 483525f73c5597c0c35de4288d97f53b9d3d262e (patch) | |
tree | 7e3d5a66bb1c4db4a52eeee919d0073237e12d4c /source4/scripting/python | |
parent | 0770028cbea5f13c0dda2b9a89803359bed66306 (diff) | |
download | samba-483525f73c5597c0c35de4288d97f53b9d3d262e.tar.gz samba-483525f73c5597c0c35de4288d97f53b9d3d262e.tar.bz2 samba-483525f73c5597c0c35de4288d97f53b9d3d262e.zip |
use a base64 encoded password when changing passwords
This avoids problems with embedded control characters in password
changes
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/samdb.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py index 1c5a8dfcde..b92a91e2ef 100644 --- 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) |