mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
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
This commit is contained in:
parent
5b4d5bee44
commit
217d04138b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user