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 12:01:38 -0400
commit2bb64e404c9d96532b5619b5801532d96f4ebb1f (patch)
treeeea78038bf09d7b19d0a9d6889c3f1df2fddfbc8 /ipa-server/ipaserver
parent570b71372f097ed986f9435d3d9795b21312060f (diff)
downloadfreeipa-2bb64e404c9d96532b5619b5801532d96f4ebb1f.tar.gz
freeipa-2bb64e404c9d96532b5619b5801532d96f4ebb1f.tar.xz
freeipa-2bb64e404c9d96532b5619b5801532d96f4ebb1f.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 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!"