libpam-ldapd가 보조 그룹을 찾지 않음

libpam-ldapd가 보조 그룹을 찾지 않음

나는 다음에서 이주하고 있다libpam-ldap에게libpam-ldapd. LDAP에서 보조 그룹을 수집하는 데 문제가 있습니다.

~에libpam-ldap, /etc/ldap.conf파일에 다음이 포함되어 있습니다.

nss_schema rfc2307bis
nss_base_passwd ou=사람,ou=CITIUS,dc=inv,dc=usc,dc=es
nss_base_shadow ou=사람,ou=CITIUS,dc=inv,dc=usc,dc=es
nss_base_group ou=그룹,ou=CITIUS,dc=inv,dc=usc,dc=es
nss_map_attribute UniqueMember 멤버

groupOfNames그룹에 대해 LDAP 클래스 대신 을 사용하고 있기 때문에 매핑이 있으므로 groupOfUniqueNames구성원 이름을 지정하는 속성 memberuniqueMember.

이제 동일한 작업을 수행하고 싶습니다.libpam-ldapd하지만 작동시킬 수 없습니다. 내 관련 부분은 다음과 같습니다 /etc/nslcd.conf.

기본 비밀번호 ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es
기본 섀도우 ou=사람,ou=CITIUS,dc=inv,dc=usc,dc=es
기본 그룹 ou=그룹,ou=CITIUS,dc=inv,dc=usc,dc=es
맵 그룹 UniqueMember 멤버

다음은 사용자가 인증될 때 nslcd의 디버그 출력입니다.

nslcd: [8b4567] 디버그: pid=12090 uid=0 gid=0의 연결
nslcd: [8b4567] 디버그: nslcd_passwd_byuid(4004)
nslcd: [8b4567] 디버그: myldap_search(base="ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es", filter="(&(objectClass=posixAccount)(uidNumber=4004))" )
nslcd: [8b4567] 디버그: ldap_initialize(ldap://172.16.54.31/)
nslcd: [8b4567] 디버그: ldap_set_rebind_proc()
nslcd: [8b4567] 디버그: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
nslcd: [8b4567] 디버그: ldap_set_option(LDAP_OPT_DEREF,0)
nslcd: [8b4567] 디버그: ldap_set_option(LDAP_OPT_TIMELIMIT,10)
nslcd: [8b4567] 디버그: ldap_set_option(LDAP_OPT_TIMEOUT,10)
nslcd: [8b4567] 디버그: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,10)
nslcd: [8b4567] 디버그: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
nslcd: [8b4567] 디버그: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
nslcd: [8b4567] 디버그: ldap_simple_bind_s("uid=ubuntu,ou=Applications,ou=CITIUS,dc=inv,dc=usc,dc=es","*****") (uri="ldap:/ /172.16.54.31/")
nslcd: [8b4567] LDAP 서버 ldap://172.16.54.31/에 연결됨
nslcd: [8b4567] DEBUG: ldap_result(): 결과 끝
nslcd: [7b23c6] 디버그: pid=15906 uid=0 gid=2000의 연결
nslcd: [7b23c6] 디버그: nslcd_pam_authc("jorge.suarez","","su","***")
nslcd: [7b23c6] 디버그: myldap_search(base="ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es", filter="(&(objectClass=posixAccount)(uid=jorge.suarez) )")
nslcd: [7b23c6] 디버그: ldap_initialize(ldap://172.16.54.31/)
nslcd: [7b23c6] 디버그: ldap_set_rebind_proc()
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_DEREF,0)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_TIMELIMIT,10)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_TIMEOUT,10)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,10)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
nslcd: [7b23c6] 디버그: ldap_simple_bind_s("uid=ubuntu,ou=Applications,ou=CITIUS,dc=inv,dc=usc,dc=es","*****") (uri="ldap:/ /172.16.54.31/")
nslcd: [7b23c6] LDAP 서버 ldap://172.16.54.31/에 연결됨
nslcd: [7b23c6] 디버그: ldap_initialize(ldap://172.16.54.31/)
nslcd: [7b23c6] 디버그: ldap_set_rebind_proc()
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_DEREF,0)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_TIMELIMIT,10)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_TIMEOUT,10)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,10)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
nslcd: [7b23c6] 디버그: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
nslcd: [7b23c6] 디버그: ldap_simple_bind_s("uid=jorge.suarez,ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es","*****") (uri="ldap ://172.16.54.31/")
nslcd: [7b23c6] LDAP 서버 ldap://172.16.54.31/에 연결됨
nslcd: [7b23c6] 디버그: myldap_search(base="uid=jorge.suarez,ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es", filter="(objectClass=posixAccount)")
nslcd: [7b23c6] 디버그: ldap_unbind()
nslcd: [3c9869] 디버그: pid=15906 uid=0 gid=2000의 연결
nslcd: [3c9869] 디버그: nslcd_pam_sess_o("jorge.suarez","uid=jorge.suarez,ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es","su","/dev /pts/7","","jorge.suarez")

그룹을 찾으려고도하지 않는 것 같습니다. 내가 뭘 잘못하고 있는 걸까요? 내 문제 정보와 관련된 내용을 볼 수 없습니다.문서. 아마도 옵션이 어떻게 작동하는지 이해하지 못할 것입니다 map.

답변1

map group매개변수는 해당 매개변수와 연결되어야 한다고 생각합니다 filter group. Active Directory에 연결하여 사용하는 방법은 다음과 같습니다.

filter passwd (&(objectClass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=Linux-SA,OU=Groups,DC=global,DC=example,DC=com)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
map    passwd uid              sAMAccountName
map    passwd homeDirectory    unixHomeDirectory
map    passwd gecos            displayName
map    passwd loginShell       "/bin/bash"
filter shadow (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))
map    shadow uid              sAMAccountName
map    shadow shadowLastChange pwdLastSet
filter group  (&(objectClass=group)(gidNumber=*))
map    group  uniqueMember        member

관련 정보