我用木偶来pipe理我们的生产服务器。 在rhel5下,启用ldap的标准方式是使用authconfig工具。 哪一个能够成功,但却不能用傀儡的方式做事。 如果我要让木偶对authenticationconfiguration文件进行相关编辑,我应该更改哪些configuration? closures我头顶的文件,我知道需要编辑启用ldap身份validation
/etc/ldap.conf /etc/nsswitch.conf
但也有可能是我不知道的pamconfiguration文件
我通常编辑:
/etc/ldap.conf /etc/nsswitch.conf /etc/openldap/ldap.conf (check for certs if necessary) /etc/pam.d/system-auth
我认为这涵盖了必要的罪恶。 可能还需要/ etc / sudoers。
我的首选是pipe理/ etc / sysconfig / authconfig(其中包含一个variables列表),然后使用authconfig –updateall,这让我放下一个控制一切的文件。
我不确定任何RedHat特定的configuration,但看看这个LDAPconfiguration指南 。
基本上,除了你提到的文件,你也应该像这样configurationPAM:
auth required pam_env.so auth sufficient pam_unix.so likeauth nullok auth sufficient pam_ldap.so use_first_pass auth required pam_deny.so account sufficient pam_unix.so account sufficient pam_ldap.so account required pam_ldap.so password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3 password sufficient pam_unix.so nullok md5 shadow use_authtok password sufficient pam_ldap.so use_first_pass password required pam_deny.so
我们的脚本来设置ldap auth(调用authconfig)来修改这些文件:
/etc/rc.d/init.d/iptables (rearrange the chkconfig priority) /etc/gshadow /etc/ssh/sshd_config /etc/ldap.conf /etc/pam.d/login /etc/pam.d/sshd /etc/group
稍微偏离主题,但是在为ldap auth设置PAM时可能会有所帮助,这是在第一次login到服务器时自动创build用户主目录。
如果您在system-auth文件中设置了ldap,则将以下内容添加到“会话”中:
session required pam_mkhomedir.so skel=/etc/skel umask=0077
在RHEL5服务器上,我在“会话需要pam_limits.so”(第三个“会话”configuration参数)之后有这个。
根据塔克的build议,puppet是跨多个服务器pipe理configuration的好工具。
如果您的kickstarting可以设置为kickstart选项请参阅:
在一个客户端上使用authconfig-tui创build必要的文件(ldap.conf,krb5.conf,pam.d / system-auth-ac等),然后将这些文件复制到您的木偶安装中,并使用木偶将文件推送到所有新的和现有的服务器。
如果你有大量的服务器,而且你不使用木偶,你应该考虑一下。