![Authconfig에서 모든 LDAP 그룹을 찾을 수 없습니다.](https://linux55.com/image/59159/Authconfig%EC%97%90%EC%84%9C%20%EB%AA%A8%EB%93%A0%20LDAP%20%EA%B7%B8%EB%A3%B9%EC%9D%84%20%EC%B0%BE%EC%9D%84%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
내 (곧) 관리자 계정은 두 그룹으로 나뉩니다.
# ldapsearch \
> -v \
> -H ldaps://localhost:636 \
> -D "${l_dirmgr}" \
> -w $(cat ${f_dirmgr_passphrase}) \
> -b "ou=groups,${l_basedn}" \
> "member=cn=testuser" \
> dn gidNumber member
dn: cn=wheel,ou=groups,dc=localdomain
gidNumber: 10
member: cn=testuser,ou=users,dc=localdomain
dn: cn=users,ou=groups,dc=localdomain
gidNumber: 100
member: cn=testuser,ou=users,dc=localdomain
그러나 id
내 사용자 레코드에 연결된 GID만 표시됩니다.
# id testuser
uid=20001(testuser) gid=100(users) groups=100(users)
// 드릴다운하여 실제로 무엇을 찾고 추출하는지 authconfig
확인하려면 어떻게 해야 합니까? 389DS 액세스 로그에는 아무 것도 표시되지 않습니다. 아마도 // 무엇이든 캐시를 업데이트하지 않기 때문일 것입니다. 아직 로그에서 실제 조회를 캡처하지 못했습니다.sssd
ldap
authconfig
sssd
(로그에서 authconfig
// sssd
내가 sssd.conf에 추가한 ldap_default_bind_dn
내용 에도 불구하고 여전히 익명 바인딩을 수행하려고 시도하는 것을 볼 수 있습니다 ldap_default_authtok
.)
답변1
신경 쓰지 마세요... ldap_default_authtok
거기에는 오래된 비밀번호가 있습니다...
(게다가 이마 중앙에 보이는 멍은 테이블에 머리를 세게 부딪쳐서 생긴 멍이에요...)
좋습니다. 이제 몇 가지 세부정보를 더 살펴보겠습니다. 내가 만든 LDAP 인스턴스가 내 것과 일치합니다.이 주제에 대한 참고 사항. 여기에는 LDIF에 대한 다음이 포함됩니다.
dn: cn=config
changetype: modify
replace: nsslapd-allow-anonymous-access
nsslapd-allow-anonymous-access: off
-
replace: nsslapd-require-secure-binds
nsslapd-require-secure-binds: on
익명 액세스를 허용하지 않기 때문에 PAM이 연결하는 데 사용하는 서비스 계정과 서비스 계정 컨테이너를 만들었습니다.
dn: ou=serviceAccounts,${l_basedn}
changetype: add
objectClass: organizationalUnit
objectClass: top
ou: serviceAccounts
description: Container for service accounts. Some will have shell access
(objectClass: posixUser), most won't.
dn: cn=svcAuthenticator,ou=serviceAccounts,${l_basedn}
changetype: add
objectClass: top
objectClass: person
cn: svcAuthenticator
sn: svcAuthenticator
userPassword: $(cat ${f_svcAuthenticator_passphrase})
description: Service account to allow PAM/SSS to search the LDAP database.
objectClass: person
( 계정에 비밀번호를 주어야 했습니다 . 하지만 sn
이는 필수 속성 objectClass: person
이므로 위조했습니다.)
/etc/pam_ldap.conf
그런 다음 해당 비밀번호를 and 에 입력했습니다 /etc/sssd/sssd.conf
.
sed --in-place=.$(date +%Y%m%d) "/#binddn.*/ a\
binddn cn=svcAuthenticator,ou=serviceAccounts,${l_basedn}" /etc/pam_ldap.conf
sed --in-place "/#bindpw.*/ a\
bindpw $(cat ${f_svcAuthenticator_passphrase})" /etc/pam_ldap.conf
sed --in-place=.$(date +%Y%m%d) "/^ldap_uri.*/ a\
ldap_default_bind_dn = cn=svcAuthenticator,ou=serviceAccounts,${l_basedn}" /etc/sssd/sssd.conf
sed --in-place "/^ldap_default_bind_dn.*/ a\
ldap_default_authtok = $(cat ${f_svcAuthenticator_passphrase})" /etc/sssd/sssd.conf
${f_svcAuthenticator_passphrase}
다른 LDAP 문제를 해결하는 동안 뭔가를 변경하고 새 값이 pam_ldap.conf
또는 에 전달되지 않을 때까지는 괜찮았습니다 sssd.conf
.
이 작업을 수행한 후에는 id
전체 그룹 목록을 포함하여 명령에서 큰 값을 얻었습니다. 나는 또한 cn=svcSUDO,ou=serviceAccounts,${l_basedn}
SUDO 권한 목록을 사용하고 얻습니다 $(cat ${f_svcSUDO_passphrase})
.