summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorMatthew Grooms <mgrooms@pfsense.org>2008-09-02 22:01:54 +0000
committerMatthew Grooms <mgrooms@pfsense.org>2008-09-02 22:01:54 +0000
commit0b31cf3e7c947ab562c964768aeabd062a4367fc (patch)
tree38ef3c7aa541323916ce9217c685d1b4249da724 /usr
parent1c8e901d6ca75ef95717c97978295e1d538c6ae9 (diff)
downloadpfsense-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.xml10
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 =&amp; 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;
OpenPOWER on IntegriCloud