summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.password
diff options
context:
space:
mode:
authorMatthew Grooms <mgrooms@pfsense.org>2008-08-11 15:56:07 +0000
committerMatthew Grooms <mgrooms@pfsense.org>2008-08-11 15:56:07 +0000
commit60286f06b53990ba235554106ef4bd36a36f451d (patch)
treeca9f632916d3513a37c1f39b94be00fda0a1f02c /etc/rc.initial.password
parent0d3f3e909371521f978dcddc016d7ceeb36fa010 (diff)
downloadpfsense-60286f06b53990ba235554106ef4bd36a36f451d.zip
pfsense-60286f06b53990ba235554106ef4bd36a36f451d.tar.gz
Do a better job of re-assigning admin privileges when the password reset
menu option is used. Reported by Scott and Chris.
Diffstat (limited to 'etc/rc.initial.password')
-rwxr-xr-xetc/rc.initial.password5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/rc.initial.password b/etc/rc.initial.password
index 82a3edd..fd27b77 100755
--- a/etc/rc.initial.password
+++ b/etc/rc.initial.password
@@ -46,7 +46,6 @@ The webConfigurator password will be reset to the default (which is "' . strtolo
echo "Failed to locate the admin user account! Attempting to restore access.\n";
$admin_user = array();
$admin_user['uid'] = 0;
- $admin_user['priv'] = explode(",", "user-shell-access,page-all");
if (!is_array($config['system']['user']))
$config['system']['user'] = array();
$config['system']['user'][] = $admin_user;
@@ -54,7 +53,9 @@ The webConfigurator password will be reset to the default (which is "' . strtolo
$admin_user['name'] = "admin";
$admin_user['scope'] = "system";
- $admin_user['blah'] = "set by console";
+
+ if (!is_array($admin_user['priv']))
+ $admin_user['priv'] = explode(",", "user-lock-webcfg,user-lock-ipages,user-shell-access");
local_user_set_password($admin_user, strtolower($g['product_name']));
local_user_set($admin_user);
OpenPOWER on IntegriCloud