mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
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
This commit is contained in:
parent
570b71372f
commit
2bb64e404c
@ -54,8 +54,8 @@ def parse_options():
|
||||
|
||||
return options, args[0]
|
||||
|
||||
def get_dirman_password():
|
||||
return installutils.read_password("Directory Manager (existing master)")
|
||||
def get_dirman_password()
|
||||
return installutils.read_password("Directory Manager (existing master)", confirm=False, validate=False)
|
||||
|
||||
def expand_info(filename):
|
||||
top_dir = tempfile.mkdtemp("ipa")
|
||||
@ -228,3 +228,8 @@ except Exception, e:
|
||||
message = message + "\n" + str
|
||||
logging.debug(message)
|
||||
sys.exit(1)
|
||||
except KeyboardInterrupt:
|
||||
print "Installation cancelled."
|
||||
print "Your system may be partly configured."
|
||||
print "Run /usr/sbin/ipa-server-install --uninstall to clean up."
|
||||
sys.exit(1)
|
||||
|
@ -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!"
|
||||
|
Loading…
Reference in New Issue
Block a user