AuthconfigですべてのLDAPグループが見つかりません。

AuthconfigですべてのLDAPグループが見つかりません。

私の(まもなく)管理者アカウントは2つのグループに分けられます。

#  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アクセスログには何も表示されません。おそらく//何もキャッシュを更新しないからです。まだログから実際のルックアップを取得できませんでした。sssdldapauthconfigsssd

(ログから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})

おすすめ記事