summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2012-03-19 14:48:43 +0100
committerMichael Adam <obnox@samba.org>2012-03-21 17:43:35 +0100
commit217d04138b9ba13ca30ea9d826e6b515d9e593dc (patch)
treeb514e2d38283900521837b7c74bbfad3bea6628f /source4/scripting
parent5b4d5bee44d595dfd11563615f37bb45b17e60b1 (diff)
downloadsamba-217d04138b9ba13ca30ea9d826e6b515d9e593dc.tar.gz
samba-217d04138b9ba13ca30ea9d826e6b515d9e593dc.tar.bz2
samba-217d04138b9ba13ca30ea9d826e6b515d9e593dc.zip
s4-samba-tool: add password verification in change user pass
Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Mar 21 17:43:35 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/netcmd/user.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py
index b56d0398ce..6ba6150004 100644
--- a/source4/scripting/python/samba/netcmd/user.py
+++ b/source4/scripting/python/samba/netcmd/user.py
@@ -442,10 +442,14 @@ class cmd_user_password(Command):
net = Net(creds, lp, server=credopts.ipaddress)
password = newpassword
- while 1:
+ while True:
if password is not None and password is not '':
break
password = getpass("New Password: ")
+ passwordverify = getpass("Retype Password: ")
+ if not password == passwordverify:
+ password = None
+ self.outf.write("Sorry, passwords do not match.\n")
try:
net.change_password(password)