use pam_acccess only for /etc/pam.d/login

remove "Allow members of group 'ssh' to login."
remove "+:ssh:ALL EXCEPT LOCAL"
This commit is contained in:
Patrick Schleizer 2019-12-12 09:00:08 -05:00
parent 22b6480bc4
commit 729fa26eca
No known key found for this signature in database
GPG key ID: CB8D50BB77BB3C48
4 changed files with 25 additions and 50 deletions

View file

@ -0,0 +1,21 @@
#!/bin/bash
## Copyright (C) 2019 - 2019 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
## See the file COPYING for copying conditions.
## https://serverfault.com/questions/134471/success-n-control-syntax-in-pam-conf-pam-d-files
set -x
true "PAM_SERVICE: $PAM_SERVICE"
if [ "$PAM_SERVICE" = "login" ]; then
## FIXME:
## Creates unwanted journal log entry.
## pam_exec(login:account): /usr/lib/security-misc/pam_only_if_login failed: exit code 1
exit 1
else
## exit success so [success=1 default=ignore] will result in skipping the
## next pam module.
exit 0
fi