diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-02-20 18:54:47 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-02-20 18:54:47 +0000 |
commit | 26dc42ee4942438e3e47984469722b0d50a6bda3 (patch) | |
tree | 3b6f096a052b6023806d77288c26d8bb1fe981df | |
parent | 687721482efb0eddb8d262d209056ee50f5ee260 (diff) | |
download | pfsense-26dc42ee4942438e3e47984469722b0d50a6bda3.zip pfsense-26dc42ee4942438e3e47984469722b0d50a6bda3.tar.gz |
Add debugging helper code.
-rw-r--r-- | etc/inc/pfsense-utils.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 070be17..e961b60 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -2598,9 +2598,11 @@ function sync_webgui_passwords() { $group = $config['system']['group'][$groupindex[$groupname]]; if (isset($group) && is_array($group)) { + log_error("Running: /usr/sbin/pw groupadd -g {$group['gid']} -n {$group['name']}"); $fd = popen("/usr/sbin/pw groupadd -g {$group['gid']} -n {$group['name']}", "r"); pclose($fd); } elseif (isAllowedToCopyFiles($user['name'])) { + log_error("Running: /usr/sbin/pw groupadd -g 100 -n scponly"); $fd = popen("/usr/sbin/pw groupadd -g 100 -n scponly", "r"); pclose($fd); } @@ -2613,10 +2615,12 @@ function sync_webgui_passwords() { isSystemAdmin($user['name']) ? $group = "wheel" : $group = "staff"; if (strpos($pwread, "no such user") === false) { + log_error("Running: /usr/sbin/pw usermod -n {$user['name']} -g {$user['groupname']} -G {$group} -H 0"); $fd = popen("/usr/sbin/pw usermod -n {$user['name']} -g {$user['groupname']} -G {$group} -H 0", "w"); fwrite($fd, $user['password']); pclose($fd); } else { + log_error("Running: /usr/sbin/pw useradd -u {$user['uid']} -n {$user['name']} -c '{$user['fullname']}' -g {$user['groupname']} -G {$group} -H 0"); $fd = popen("/usr/sbin/pw useradd -u {$user['uid']} -n {$user['name']} -c '{$user['fullname']}' -g {$user['groupname']} -G {$group} -H 0", "w"); fwrite($fd, $user['password']); pclose($fd); |