From 217d04138b9ba13ca30ea9d826e6b515d9e593dc Mon Sep 17 00:00:00 2001 From: Björn Baumbach Date: Mon, 19 Mar 2012 14:48:43 +0100 Subject: s4-samba-tool: add password verification in change user pass Signed-off-by: Michael Adam Autobuild-User: Michael Adam Autobuild-Date: Wed Mar 21 17:43:35 CET 2012 on sn-devel-104 --- source4/scripting/python/samba/netcmd/user.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit