大网数据广告活动
服务器运维问答

sss_cache keeps looking for a LOCAL domain, not purging LDAP records

· 52CE 我爱测

I've added a user to a group in LDAP. The user shows up in ldapsearch. However, the user does not show up when I list group members on my RHEL instance using getent group my_group . Am I correct in assuming that this is because S…

问题原文

原帖链接 · Leo · CC BY-SA 3.0

I've added a user to a group in LDAP. The user shows up in ldapsearch. However, the user does not show up when I list group members on my RHEL instance using getent group my_group.

Am I correct in assuming that this is because SSSD caches group membership?

When I try to purge the SSSD cache for the group, it doesn't do anything:

# sss_cache -d LDAP -g my_group
(Mon Dec 14 10:40:41:816191 2015) [sss_cache] [confdb_get_domain_internal] (0x0010): Unknown domain [LOCAL]
(Mon Dec 14 10:40:41:816364 2015) [sss_cache] [confdb_get_domains] (0x0010): Error (2 [No such file or directory]) retrieving domain [LOCAL], skipping!
# echo $?
0

Specifically, the user still doesn't show up in the getent group my_group listing.

Why is it looking for a "LOCAL" domain when I specified the "LDAP" domain in the command?

Here's the SSSD configuration

# cat /etc/sssd/sssd.conf
[sssd]
config_file_version = 2
reconnection_retries = 3
sbus_timeout = 30
services = nss, pam
domains = LOCAL,LDAP
debug_level = 5

[nss]
filter_groups = root
filter_users = root
reconnection_retries = 3
entry_cache_timeout = 300
entry_cache_nowait_percentage = 75

[pam]
reconnection_retries = 3
offline_credentials_expiration = 2
offline_failed_login_attempts = 3
offline_failed_login_delay = 5

[domain/LDAP]
cache_credentials = true

id_provider = ldap
auth_provider = ldap

ldap_uri = ldaps://my_hostname.my_domain.com
ldap_search_base = dc=my_domain,dc=com
ldap_id_use_start_tls = true
ldap_tls_reqcert = never
ldap_tls_cacert = /etc/pki/tls/certs/ca-bundle.crt

debug_level = 5
  1. Is this a bug in sss_cache?

  2. Should I just rm -f /var/lib/sss/db/cache_LDAP.ldb instead?

  3. At that point, should I just set cache_credentials = false in sssd.conf?

已采纳解答

原帖链接 · jhrozek · CC BY-SA 3.0

  1. I don't think it's a bug in sss_cache, your configuration references a domain called LOCAL, yet the domain is not defined. Just drop LOCAL from the domains line and try again..

  2. That is different. sss_cache works by setting the expiration timestamp to the past. This forces the lookup next time, but doesn't remove the entries completely, so they are still around for cases where the client would go offline

  3. That really depends on whether you want to allow your users to log in while the connection to the server is lost.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-12-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。