From 2bb64e404c9d96532b5619b5801532d96f4ebb1f Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 29 Apr 2008 14:12:00 -0400 Subject: Don't prompt for confirmation of DM password when installing a replica. It implies that you are setting a new password and you really aren't. Also added a catch for KeyboardInterrupt with instructions on how to recover from a partial install. 441607 --- ipa-server/ipaserver/installutils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ipa-server/ipaserver') diff --git a/ipa-server/ipaserver/installutils.py b/ipa-server/ipaserver/installutils.py index 2624ae141..37ee5d6ab 100644 --- a/ipa-server/ipaserver/installutils.py +++ b/ipa-server/ipaserver/installutils.py @@ -161,16 +161,19 @@ def standard_logging_setup(log_filename, debug=False): console.setFormatter(formatter) logging.getLogger('').addHandler(console) -def read_password(user): +def read_password(user, confirm=True, validate=True): correct = False pwd = "" while not correct: pwd = getpass.getpass(user + " password: ") if not pwd: continue - if len(pwd) < 8: + if validate and len(pwd) < 8: print "Password must be at least 8 characters long" continue + if not confirm: + correct = True + continue pwd_confirm = getpass.getpass("Password (confirm): ") if pwd != pwd_confirm: print "Password mismatch!" -- cgit