summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2012-03-08 15:27:05 +0100
committerMichael Adam <obnox@samba.org>2012-03-21 16:11:24 +0100
commit0f35c4a242db4dd545bfacd86d38e596e06454bc (patch)
treec2642075f4085f055f18ae84c6964cc5ab59541e
parentf3fe53668f5f42123ab4d91de23ac4f16bf12733 (diff)
downloadsamba-0f35c4a242db4dd545bfacd86d38e596e06454bc.tar.gz
samba-0f35c4a242db4dd545bfacd86d38e596e06454bc.tar.bz2
samba-0f35c4a242db4dd545bfacd86d38e596e06454bc.zip
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 <obnox@samba.org>
-rwxr-xr-xsource4/setup/provision12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/setup/provision b/source4/setup/provision
index 4316ad00c6..57183540db 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -165,11 +165,17 @@ if opts.interactive:
opts.server_role = ask("Server Role (dc, member, standalone)", "dc")
for i in range(3):
- opts.adminpass = getpass("Administrator password: ")
- if not opts.adminpass:
+ 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')