diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-12-02 16:21:30 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-12-02 16:21:30 -0200 |
commit | 61422dd487c2646c21b09b8bb3588ed3e49e3223 (patch) | |
tree | a1b0d102c952f104afffc36ceb5e885677fa2e61 /etc/rc.initial.password | |
parent | 338ded9b3ccdd6826b3ba250f39fbc6deaf5ab6e (diff) | |
download | pfsense-61422dd487c2646c21b09b8bb3588ed3e49e3223.zip pfsense-61422dd487c2646c21b09b8bb3588ed3e49e3223.tar.gz |
When reset webConfigurator password, if authentication server is not Local Database, ask user to back to it. Fix #3341
Diffstat (limited to 'etc/rc.initial.password')
-rwxr-xr-x | etc/rc.initial.password | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/rc.initial.password b/etc/rc.initial.password index 65676f9..1de1a79 100755 --- a/etc/rc.initial.password +++ b/etc/rc.initial.password @@ -44,6 +44,14 @@ The webConfigurator admin password and privileges will be reset to the default ( gettext('Do you want to proceed [y|n]?'); if (strcasecmp(chop(fgets($fp)), "y") == 0) { + if (isset($config['system']['webgui']['authmode']) && + $config['system']['webgui']['authmode'] != "Local Database") { + echo "\n" . gettext(' +The User manager authentication server is set to "' . $config['system']['webgui']['authmode'] . '".') . "\n" . + gettext('Do you want to set it back to Local Database [y|n]?'); + if (strcasecmp(chop(fgets($fp)), "y") == 0) + $config['system']['webgui']['authmode'] = "Local Database"; + } $admin_user =& getUserEntryByUID(0); if (!$admin_user) { echo "Failed to locate the admin user account! Attempting to restore access.\n"; |