Pamldap 연결이 거부되었습니다.

Pamldap 연결이 거부되었습니다.

Ubuntu 16.04에서 pamldap을 통해 SSH 액세스를 설정하려고 하는데 모든 것을 구성한 후에 /etc/passwd를 LDAP 서버의 정보와 동기화할 수 없습니다.

ldapsearch가 제대로 작동하므로 바인드 옵션이 잘 구성되었습니다.

내가 할 때

getent group

LDAP 서버의 모든 그룹을 볼 수 있지만

getent passwd

로컬 사용자 정보만 있습니다.

nslcd를 디버깅하면 ldap 사용자(su 또는 ssh)를 사용하여 로그인을 시도할 때마다 LDAP 서버에서 내 사용자를 찾는 것을 볼 수 있습니다.

또한: su ldap_user 반환:

사용자에 대한 비밀번호 입력이 없습니다.

SSH 연결을 시도하면 auth.log에 다음과 같이 기록됩니다.

Invalid user ldap_user from IP
input_userauth_request: invalid user ldap_user [preauth]
pam_unix(sshd:auth): check pass; user unknown
pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=IP
pam_sss(sshd:auth): Request to sssd failed. Connection refused
pam_ldap(sshd:auth): Authentication failure; user=ldap_user
Failed password for invalid user ldap_user from IP port 55911 ssh2

nsswitch.conf파일은 다음과 같습니다:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat ldap
group:          compat ldap
shadow:         compat ldap
gshadow:        files

hosts:          files dns ldap
networks:       files ldap

protocols:      db files ldap
services:       db files ldap
ethers:         db files ldap
rpc:            db files ldap

netgroup:       nis ldap
sudoers:        files

답변1

"PosixAccount" 개체 클래스를 가진 LDAP 사용자가 없으므로 uid 속성은 고려되지 않습니다. 사용되는 기본 클래스에는 Linux 시스템에 로그인하는 데 필요한 속성이 없기 때문입니다.

관련 정보