summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards/setup_wizard.xml
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/wizards/setup_wizard.xml')
-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 e6b46bc..1cf882c 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;
OpenPOWER on IntegriCloud