diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-07-28 15:14:03 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-07-28 08:35:45 +0200 |
commit | 427805b87a0781a4b39594f4efdf4b9d023d2324 (patch) | |
tree | f02051b089e3ab5d63421c0506e32958349cdf4f /source4/scripting/python | |
parent | 2b6ea7975b5254a90ea183e3a69647920cbf4595 (diff) | |
download | samba-427805b87a0781a4b39594f4efdf4b9d023d2324.tar.gz samba-427805b87a0781a4b39594f4efdf4b9d023d2324.tar.bz2 samba-427805b87a0781a4b39594f4efdf4b9d023d2324.zip |
samba-tool: ensure prompting of passwords is in the right order
ask the creds object for the password before prompting for the new
password in the user password change code, to ensure the user is asked
for the old password first
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Jul 28 08:35:45 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/netcmd/user.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py index b13bc0d606..96a198a523 100644 --- a/source4/scripting/python/samba/netcmd/user.py +++ b/source4/scripting/python/samba/netcmd/user.py @@ -209,7 +209,9 @@ class cmd_user_password(Command): lp = sambaopts.get_loadparm() creds = credopts.get_credentials(lp) - # FIXME: How to ensure user is authenticated before prompting for new password? + # get old password now, to get the password prompts in the right order + old_password = creds.get_password() + net = Net(creds, lp, server=credopts.ipaddress) password = newpassword |