summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-04-29 14:12:00 -0400
committerRob Crittenden <rcritten@redhat.com>2008-05-08 11:59:30 -0400
commit561c3385acc76c1b89aaf5279cfc5ed4a834fb70 (patch)
treeac0cede8cade2d7ee16c7d5c2401e8794fdc679f /ipa-server/ipaserver
parenta48fb637e071eef40eb967f9d01c64cf81d9e632 (diff)
downloadfreeipa-561c3385acc76c1b89aaf5279cfc5ed4a834fb70.tar.gz
freeipa-561c3385acc76c1b89aaf5279cfc5ed4a834fb70.tar.xz
freeipa-561c3385acc76c1b89aaf5279cfc5ed4a834fb70.zip
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
Diffstat (limited to 'ipa-server/ipaserver')
-rw-r--r--ipa-server/ipaserver/installutils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ipa-server/ipaserver/installutils.py b/ipa-server/ipaserver/installutils.py
index 2624ae14..37ee5d6a 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!"