我正在尝试设置PAM / LDAP,以便当login的SSH用户使用passwd更改密码时,它将在更新LDAP条目之前使用SHA1encryption密码。 我有这个
# /etc/ldap.conf ... rootbinddn cn=Manager,dc=ourdomain,dc=com rootpw secret pam_crypt local
当用户使用passwd更改密码时,在LDAP中,条目看起来像这样
{crypt}41H84HEld3
所以它就像crypt 。 我不知道如何强制它是SHA / SHA1 。 我尝试添加
pam_password sha
到/etc/ldap.conf但是这个密码刚刚出现并以明文forms存储在LDAP中。
从这个源 ,在RHEL | CentOS 5:
显示当前的散列algorithm
input以下命令:#authconfig –test | grep哈希
示例输出:
password hashing algorithm is md5
configurationLinux服务器以使用SHA-512
要configurationLinux系统以使用SHA-512algorithm,请input:#authconfig –passalgo = sha512 –update
注意:用户需要更改密码才能使用SHA-512生成散列。 您可以强制用户在下次login时更改密码:
# chage -d 0 userName
我没有尝试过(只有CentOS 4方便),但希望它有帮助。