diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-04 00:21:46 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-04 00:21:46 +0000 |
commit | f53c7cd0ab6ff80679cb949d191e7ba6df1f7e96 (patch) | |
tree | ebb109444cf1f0597f1ac9a20d6e78ff06fde362 /etc/inc | |
parent | c2acdb73d8c4fcf2a18da10faf854d6c2e230450 (diff) | |
download | pfsense-f53c7cd0ab6ff80679cb949d191e7ba6df1f7e96.zip pfsense-f53c7cd0ab6ff80679cb949d191e7ba6df1f7e96.tar.gz |
only generate salt and crypted_pw once
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 3c7b5e9..d5af6f9 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"); |