The branch, master has been updated via 217d041 s4-samba-tool: add password verification in change user pass via 5b4d5be s4-samba-tool: add password verification in add user via 70e7124 s4-provision: don't ask only 3 times for passwd in interactive mode via 0f35c4a s4-provision: add password verification in interactive mode from f3fe536 s3: Move the notify_ctx to the smbd_server_connection
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 217d04138b9ba13ca30ea9d826e6b515d9e593dc Author: Björn Baumbach <b...@sernet.de> Date: Mon Mar 19 14:48:43 2012 +0100 s4-samba-tool: add password verification in change user pass Signed-off-by: Michael Adam <ob...@samba.org> Autobuild-User: Michael Adam <ob...@samba.org> Autobuild-Date: Wed Mar 21 17:43:35 CET 2012 on sn-devel-104 commit 5b4d5bee44d595dfd11563615f37bb45b17e60b1 Author: Björn Baumbach <b...@sernet.de> Date: Thu Mar 8 15:40:58 2012 +0100 s4-samba-tool: add password verification in add user Signed-off-by: Michael Adam <ob...@samba.org> commit 70e71240e27e4b36b235afc0aeb302710a2b580e Author: Björn Baumbach <b...@sernet.de> Date: Tue Mar 20 11:10:44 2012 +0100 s4-provision: don't ask only 3 times for passwd in interactive mode Signed-off-by: Michael Adam <ob...@samba.org> commit 0f35c4a242db4dd545bfacd86d38e596e06454bc Author: Björn Baumbach <b...@sernet.de> Date: Thu Mar 8 15:27:05 2012 +0100 s4-provision: add password verification in interactive mode Since we do not print the password out (anymore), it is necessary to verify the entered password. Signed-off-by: Michael Adam <ob...@samba.org> ----------------------------------------------------------------------- Summary of changes: source4/scripting/python/samba/netcmd/user.py | 10 +++++++++- source4/setup/provision | 14 ++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py index f44ebca..6ba6150 100644 --- a/source4/scripting/python/samba/netcmd/user.py +++ b/source4/scripting/python/samba/netcmd/user.py @@ -120,6 +120,10 @@ Example3 shows how to create a new user in the OrgUnit organizational unit. 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") lp = sambaopts.get_loadparm() creds = credopts.get_credentials(lp) @@ -438,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) diff --git a/source4/setup/provision b/source4/setup/provision index 4316ad0..554a516 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -164,12 +164,18 @@ if opts.interactive: sys.exit(1) opts.server_role = ask("Server Role (dc, member, standalone)", "dc") - for i in range(3): - opts.adminpass = getpass("Administrator password: ") - if not opts.adminpass: + while True: + adminpass = getpass("Administrator password: ") + if not adminpass: print >>sys.stderr, "Invalid administrator password." else: - break + adminpassverify = getpass("Retype password: ") + if not adminpass == adminpassverify: + print >>sys.stderr, "Sorry, passwords do not match." + else: + opts.adminpass = adminpass + break + else: if opts.realm in (None, ""): opts.realm = sambaopts._lp.get('realm') -- Samba Shared Repository