diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-02 22:01:54 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-02 22:01:54 +0000 |
commit | 0b31cf3e7c947ab562c964768aeabd062a4367fc (patch) | |
tree | 38ef3c7aa541323916ce9217c685d1b4249da724 /usr | |
parent | 1c8e901d6ca75ef95717c97978295e1d538c6ae9 (diff) | |
download | pfsense-0b31cf3e7c947ab562c964768aeabd062a4367fc.zip pfsense-0b31cf3e7c947ab562c964768aeabd062a4367fc.tar.gz |
Correct a problem with the setup wizzard. It was using a legacy method to
set the administrative password. This was causing failures while parsing
the xml file.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/wizards/setup_wizard.xml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml index fd37c28..d7df809 100644 --- a/usr/local/www/wizards/setup_wizard.xml +++ b/usr/local/www/wizards/setup_wizard.xml @@ -418,14 +418,10 @@ <stepsubmitphpaction> if($_POST['adminpassword'] != "") { if($_POST['adminpassword'] == $_POST['adminpasswordagain']) { - $fd = popen("/usr/sbin/pw usermod -n root -H 0", "w"); - $salt = md5(time()); - $crypted_pw = crypt($_POST['adminpassword'],$salt); - fwrite($fd, $crypted_pw); - pclose($fd); - $config['system']['password'] = crypt($_POST['adminpassword']); + $admin_user =& getUserEntryByUID(0); + local_user_set_password($admin_user, $_POST['adminpassword']); + local_user_set($admin_user); write_config(); - system_password_configure(); } else { print_info_box_np("Passwords do not match! Please press back in your browser window and correct."); die; |