首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >必须向nsswitch.conf添加哪些内容才能显示AD用户和组?

必须向nsswitch.conf添加哪些内容才能显示AD用户和组?
EN

Unix & Linux用户
提问于 2018-08-09 14:54:37
回答 1查看 6.4K关注 0票数 2

这是这个问题的后续行动.

我有一台CentOS 7机器,它加入了域FOOBAR。可以通过以下方式成功获取存储在AD中的用户的信息

代码语言:javascript
复制
id user@FOOBAR.GLOBAL

但是,getent passwdgetent group没有显示AD中定义的用户和组。

以下是/etc/nsswitch.conf中的相关行:

代码语言:javascript
复制
passwd:     files sss
shadow:     files sss
group:      files sss

在那里需要加些什么?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2018-08-10 12:57:35

正如@Doug‘’Neal在评论中所建议的,有必要设置

代码语言:javascript
复制
enumerate = true

/etc/sssd/sssd.conf中。

现在,getent passwdgetent group显示AD中定义的所有用户和组。

请注意,通常不建议使用此选项。来自man sssd.conf

代码语言:javascript
复制
(...)
    enumerate (bool)
       Determines if a domain can be enumerated. This parameter can have one of the
       following values:

       TRUE = Users and groups are enumerated

       FALSE = No enumerations for this domain

       Default: FALSE

       Note: Enabling enumeration has a moderate performance impact on SSSD while enumeration
       is running. It may take up to several minutes after SSSD startup to fully complete 
       enumerations. During this time, individual requests for information will go directly
       to LDAP, though it may be slow, due to the heavy enumeration processing. Saving a large 
       number of entries to cache after the enumeration completes might also be CPU intensive
       as the memberships have to be recomputed.

       While the first enumeration is running, requests for the complete user or group lists
       may return no results until it completes.

       Further, enabling enumeration may increase the time necessary to detect network
       disconnection, as longer timeouts are required to ensure that enumeration
       lookups are completed successfully. For more information, refer to the man pages for 
       the specific id_provider in use.

       For the reasons cited above, enabling enumeration is not recommended, especially in 
       large environments.
(...)
票数 4
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/461578

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档