diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 3c7b5e9e39..d5af6f9455 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1193,16 +1193,14 @@ function sync_webgui_passwords() { global $config; conf_mount_rw(); $config['system']['password'] = crypt($_POST['password']); - /* sync root */ - $fd = popen("/usr/sbin/pw usermod -n root -H 0", "w"); $salt = md5(time()); $crypted_pw = crypt($_POST['password'],$salt); + /* sync root */ + $fd = popen("/usr/sbin/pw usermod -n root -H 0", "w"); fwrite($fd, $crypted_pw); pclose($fd); /* sync admin */ $fd = popen("/usr/sbin/pw usermod -n admin -H 0", "w"); - $salt = md5(time()); - $crypted_pw = crypt($_POST['password'],$salt); fwrite($fd, $crypted_pw); pclose($fd); update_changedesc("password changed via webConfigurator");