summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.password
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-12-02 16:21:30 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-12-02 16:21:30 -0200
commit61422dd487c2646c21b09b8bb3588ed3e49e3223 (patch)
treea1b0d102c952f104afffc36ceb5e885677fa2e61 /etc/rc.initial.password
parent338ded9b3ccdd6826b3ba250f39fbc6deaf5ab6e (diff)
downloadpfsense-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-xetc/rc.initial.password8
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";
OpenPOWER on IntegriCloud