我试图将我们的一些LDAP用户添加到我们的RHEL服务器上的本地定义的组,但是我得到一个错误,指出在/ etc / passwd中找不到LDAP用户。
允许将LDAP用户添加到本地组的最佳方式是什么?
我的感觉是这个必须手动完成。 我可以编辑: /etc/group并将LDAP组添加到列表中。 那会是理想的吗?
[server]# id apache uid=409(apache) gid=409(apache) groups=409(apache) context=user_u:system_r:unconfined_t:s0 [server]# id john.doe uid=11389(john.doe) gid=6097(ABC_Corporate_US) groups=6097(ABC_Corporate_US) context=user_u:system_r:unconfined_t:s0 [server]# /usr/sbin/usermod -a -G apache john.doe usermod: john.doe not found in /etc/passwd
操作系统:RHEL(红帽企业Linux服务器版本5.3(Tikanga))注意:更新此机器上的操作系统不是一个选项。
您的usermod版本不支持LDAP。 这在RHEL的新版本中得到修复:
我发现这可以使用gpasswd命令来实现。
gpasswd -a john.doe apache