From: Mukund Sivaraman Date: Wed, 27 Feb 2013 00:45:00 +0000 (+0530) Subject: [2641] Revise prompts displayed by bindctl when login fails X-Git-Tag: bind10-1.1.0beta1-release~51^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=27dc1e7a87eb35dfa6a67f44b8ddf2d66d26abab;p=thirdparty%2Fkea.git [2641] Revise prompts displayed by bindctl when login fails --- diff --git a/src/bin/bindctl/bindcmd.py b/src/bin/bindctl/bindcmd.py index fa4ce6d828..d750b35a49 100644 --- a/src/bin/bindctl/bindcmd.py +++ b/src/bin/bindctl/bindcmd.py @@ -33,6 +33,7 @@ import inspect import pprint import ssl, socket import os, time, random, re +import os.path import getpass from hashlib import sha1 import csv @@ -268,9 +269,21 @@ WARNING: Python readline module isn't available, so the command line editor # No valid logins were found, prompt the user for a username/password count = 0 - self._print('No stored password file found, please see sections ' - '"Configuration specification for b10-cmdctl" and "bindctl ' - 'command-line options" of the BIND 10 guide.') + if not os.path.exists(self.csv_file_dir + CSV_FILE_NAME): + self._print('\nNo stored password file found.\n\n' + 'When the system is first set up you need to create ' + 'at least one user account.\n' + 'For information on how to set up a BIND 10 system, ' + 'please check see the\n' + 'BIND 10 Guide: \n\n' + 'http://bind10.isc.org/docs/bind10-guide.html#quick-start-auth-dns\n\n' + + 'If a user account has been set up, please check the ' + 'b10-cmdctl log for other\n' + 'information.\n') + else: + self._print('Login failed: either the user name or password is ' + 'invalid.\n') while True: count = count + 1 if count > 3: