Commit 643d2eef authored by Ad Schellevis's avatar Ad Schellevis

(auth/installer) force unlocked account, so pam can use standard pam_unix.so

parent cc05a977
...@@ -401,7 +401,7 @@ function local_sync_accounts($verbose = false) ...@@ -401,7 +401,7 @@ function local_sync_accounts($verbose = false)
} }
} }
function local_user_set(&$user) function local_user_set(&$user, $force_unlock = false)
{ {
if (empty($user['password'])) { if (empty($user['password'])) {
log_error(sprintf( log_error(sprintf(
...@@ -416,7 +416,7 @@ function local_user_set(&$user) ...@@ -416,7 +416,7 @@ function local_user_set(&$user)
$user_home = "/home/{$user_name}"; $user_home = "/home/{$user_name}";
$user_shell = '/sbin/nologin'; $user_shell = '/sbin/nologin';
$user_group = 'nobody'; $user_group = 'nobody';
$lock_account = 'lock'; $lock_account = $force_unlock ? 'unlock' : 'lock';
@mkdir('/home', 0755); @mkdir('/home', 0755);
...@@ -430,7 +430,7 @@ function local_user_set(&$user) ...@@ -430,7 +430,7 @@ function local_user_set(&$user)
$user_shell = '/bin/csh'; $user_shell = '/bin/csh';
} }
/* unlock valid shell users */ /* unlock valid shell users (only when integrated auth is disabled, our users are locked locally by default)*/
if (!is_account_disabled($user_name) && !is_account_expired($user_name) if (!is_account_disabled($user_name) && !is_account_expired($user_name)
&& !empty($config['system']['disableintegratedauth'])) { && !empty($config['system']['disableintegratedauth'])) {
$lock_account = 'unlock'; $lock_account = 'unlock';
......
...@@ -189,7 +189,7 @@ if ($setup_installer) { ...@@ -189,7 +189,7 @@ if ($setup_installer) {
if ($root) { if ($root) {
$root['shell'] = '/usr/local/etc/rc.installer'; $root['shell'] = '/usr/local/etc/rc.installer';
$root['name'] = 'installer'; $root['name'] = 'installer';
local_user_set($root); local_user_set($root, true);
mwexec("/usr/local/etc/rc.sshd installer"); mwexec("/usr/local/etc/rc.sshd installer");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment