diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-07-25 02:28:31 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-07-25 02:28:31 +0000 |
commit | 45ee90edb38f3c52a242d248468a992bf19f1c44 (patch) | |
tree | 14e5a6b3c6a7ff340858442dddc9241b3e8fc9a0 /etc/rc.initial.password | |
parent | 8057888036bfcacd59c9d0fcf235aba5dc65682b (diff) | |
download | pfsense-45ee90edb38f3c52a242d248468a992bf19f1c44.zip pfsense-45ee90edb38f3c52a242d248468a992bf19f1c44.tar.gz |
Rewrite portions of the user manager to ensure data is properly synced to
the system password and group databases. This is to provide better support
for centralized user management when local account administration is
preferred.
I also took this opportunity to do some housekeeping. A lot of funtions
that were only being used in one place or not at all were removed. The
user page privelege checks were also simplified in preperation for future
work in this area.
Diffstat (limited to 'etc/rc.initial.password')
-rwxr-xr-x | etc/rc.initial.password | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/etc/rc.initial.password b/etc/rc.initial.password index 6cf0228..64dd34e 100755 --- a/etc/rc.initial.password +++ b/etc/rc.initial.password @@ -41,12 +41,17 @@ The webConfigurator password will be reset to the default (which is "' . strtolo gettext('Do you want to proceed [y|n]?'); if (strcasecmp(chop(fgets($fp)), "y") == 0) { - $adminUserName = getUNIXRootName(); - setUserName($adminUserName, "admin"); - setUserPWD($adminUserName, strtolower($g['product_name'])); - write_config(gettext("password changed from console menu")); - system_password_configure(); + foreach ($config['system']['user'] as & $user) { + if (isset($user['uid']) && !$user['uid']) { + $user['name'] = "admin"; + set_local_user_password($user,strtolower($g['product_name'])); + set_local_user($user); + write_config(gettext("password changed from console menu")); + system_password_configure(); + break; + } + } echo "\n" . gettext(' The password for the webConfigurator has been reset and @@ -58,7 +63,4 @@ the default as soon as you have logged into the webConfigurator.') . "\n" . fgets($fp); } - - sync_webgui_passwords(); - -?>
\ No newline at end of file +?> |