summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-01-25 15:28:57 -0500
committerjim-p <jimp@pfsense.org>2012-01-25 15:39:33 -0500
commit6763033dd5dcbac3fb21720bd76e395e7dcb8d65 (patch)
tree585a47de24902c52ca504b39912feaef76ecab6a /etc/inc/auth.inc
parent1f78ab3a8ad3ee5676b70d511c1f9c8df21d3567 (diff)
downloadpfsense-6763033dd5dcbac3fb21720bd76e395e7dcb8d65.zip
pfsense-6763033dd5dcbac3fb21720bd76e395e7dcb8d65.tar.gz
Include admin user in bootup account sync
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc8
1 files changed, 2 insertions, 6 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index ad5e5ae..8d0dbd4 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -304,13 +304,9 @@ function local_sync_accounts() {
if ($fd) {
while (!feof($fd)) {
$line = explode(":",fgets($fd));
- if (!strncmp($line[0], "_", 1))
- continue;
- if ($line[2] < 2000)
- continue;
- if ($line[2] > 65000)
+ if (((!strncmp($line[0], "_", 1)) || ($line[2] < 2000) || ($line[2] > 65000)) && ($line[0] != "admin"))
continue;
- $cmd = "/usr/sbin/pw userdel {$line[2]}";
+ $cmd = "/usr/sbin/pw userdel -n '{$line[0]}'";
if($debug)
log_error(sprintf(gettext("Running: %s"), $cmd));
mwexec($cmd);
OpenPOWER on IntegriCloud