Commit ee873727 authored by Franco Fichtner's avatar Franco Fichtner

rc: tweak password reset just a wee bit more

parent f3d9e10b
......@@ -27,8 +27,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
require_once('config.inc');
require_once('auth.inc');
require_once('functions.inc');
......@@ -36,12 +34,15 @@ require_once('shaper.inc');
$fp = fopen('php://stdin', 'r');
printf(_("The %s password will be reset to the factory default `%s'."),
$g['factory_shipped_username'], $g['factory_shipped_password']);
printf("\n");
printf(
_('The %s password will be reset to the factory default of `%s\'.'),
$g['factory_shipped_username'],
$g['factory_shipped_password']
);
printf("\n\n");
printf(_('Do you want to proceed [y|n]? '));
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
if (strcasecmp(chop(fgets($fp)), 'y') == 0) {
if (isset($config['system']['webgui']['authmode']) &&
$config['system']['webgui']['authmode'] != "Local Database") {
echo "\n" . gettext('
......@@ -72,10 +73,9 @@ The User manager authentication server is set to "' . $config['system']['webgui'
local_user_set($admin_user);
write_config($config, gettext("password changed from console menu"));
printf("\n\n");
printf(_("The password has been reset."));
printf("\n");
printf(_("Please change the password as soon as you log in!"));
printf("\n\n");
printf(_("Press any key to continue."));
fgets($fp);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment