summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-20 18:54:47 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-20 18:54:47 +0000
commit26dc42ee4942438e3e47984469722b0d50a6bda3 (patch)
tree3b6f096a052b6023806d77288c26d8bb1fe981df /etc
parent687721482efb0eddb8d262d209056ee50f5ee260 (diff)
downloadpfsense-26dc42ee4942438e3e47984469722b0d50a6bda3.zip
pfsense-26dc42ee4942438e3e47984469722b0d50a6bda3.tar.gz
Add debugging helper code.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc4
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);
OpenPOWER on IntegriCloud