summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-06-25 13:08:09 -0400
committerjim-p <jimp@pfsense.org>2010-06-25 13:08:47 -0400
commit2708e3997d81f8a755d6b6a31247c2c120b4b4de (patch)
treedc104405ab006c611c8336161b65b10cdac7c640 /etc/inc/auth.inc
parent4c9a23db7df40aa1b60a17d205fc7faa11f62257 (diff)
downloadpfsense-2708e3997d81f8a755d6b6a31247c2c120b4b4de.zip
pfsense-2708e3997d81f8a755d6b6a31247c2c120b4b4de.tar.gz
Remove some redundant code and make sure admin's home directory is /root - Fixes #218
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc14
1 files changed, 1 insertions, 13 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 3a72db9..4f97f24 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -269,9 +269,9 @@ function local_user_set(& $user) {
fwrite($fd, $user['password']);
pclose($fd);
$user_group = "wheel";
+ $user_home = "/root";
}
-
/* read from pw db */
$fd = popen("/usr/sbin/pw usershow {$user_name} 2>&1", "r");
$pwread = fgets($fd);
@@ -295,18 +295,6 @@ function local_user_set(& $user) {
fwrite($fd, $user['password']);
pclose($fd);
-
- /* admin user special handling */
- if ($user_uid == 0) {
- $cmd = "/usr/sbin/pw usermod -q -n {$user_name} -s /etc/rc.initial -H 0";
- if($debug)
- log_error("Running: {$cmd}");
- $fd = popen($cmd, "w");
- fwrite($fd, $user['password']);
- pclose($fd);
- $user_group = "wheel";
- }
-
/* create user directory if required */
if (!is_dir($user_home)) {
mkdir($user_home, 0700);
OpenPOWER on IntegriCloud