Commit ff8632c2 authored by Ad Schellevis's avatar Ad Schellevis

(pam) work in progress: pam helper skip for non local users, for non existing...

(pam) work in progress: pam helper skip for non local users, for non existing users pam should proceed to the next option.

When our pam modules is used, we set local auth to disabled (locked) for our users, non local users should automatically use normal unix auth.
For this to work, we should pass PAM_USER_UNKNOWN as return value in our pam module when the user is not local to us and unauthenticated.
parent 92d7bce2
...@@ -431,7 +431,8 @@ function local_user_set(&$user) ...@@ -431,7 +431,8 @@ function local_user_set(&$user)
} }
/* unlock valid shell users */ /* unlock valid shell users */
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'])) {
$lock_account = 'unlock'; $lock_account = 'unlock';
} }
......
...@@ -9,16 +9,18 @@ auth sufficient pam_opie.so no_warn no_fake_prompts ...@@ -9,16 +9,18 @@ auth sufficient pam_opie.so no_warn no_fake_prompts
auth requisite pam_opieaccess.so no_warn allow_local auth requisite pam_opieaccess.so no_warn allow_local
#auth sufficient pam_krb5.so no_warn try_first_pass #auth sufficient pam_krb5.so no_warn try_first_pass
#auth sufficient pam_ssh.so no_warn try_first_pass #auth sufficient pam_ssh.so no_warn try_first_pass
{% if system.disableintegratedauth|default('0') == '1' %} {% if system.disableintegratedauth|default('0') == '0' %}
auth required pam_unix.so no_warn try_first_pass auth sufficient pam_opnsense.so
{% else %}
auth required pam_opnsense.so
{% endif %} {% endif %}
auth required pam_unix.so no_warn try_first_pass
# account # account
account required pam_nologin.so account required pam_nologin.so
#account required pam_krb5.so #account required pam_krb5.so
account required pam_login_access.so account required pam_login_access.so
{% if system.disableintegratedauth|default('0') == '0' %}
account sufficient pam_opnsense.so
{% endif %}
account required pam_unix.so account required pam_unix.so
# session # session
......
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