I've successfully configured LDAP and SSH. Also I've added a requirement that user should be in a group called admin
. That works.
/etc/ldap.conf
...
pam_groupdn cn=admin,ou=Groups,dc=example,dc=com
...
/etc/pam.d/sshd
...default ubuntu values here...
...
auth required pam_ldap.so
account required pam_ldap.so
password required pam_ldap.so
session required pam_ldap.so
BUT I would like to add an exception for local backup
user in emergency case when LDAP is not reachable. This user has sudo
and authorized_keys
. How can I achieve that?
Right now I can see only this error message:
sshd[12345]: fatal: Access denied for user backup by PAM account configuration [preauth]