将SuSE用户的密码哈希algorithm从blowfish更改为MD5

我有大约1000台SuSE机器的networking,每台机器有20-200个用户。 使用的密码哈希algorithm是默认的,即河豚。 为了检查用户是否使用了字典词作为密码,已经编写了一个使用密码系统调用的小型实用程序。 河豚的密码系统调用运行10个周期,执行速度非常缓慢。 由于密码哈希algorithm不可行,因此使用10次迭代的河豚。 因此,想要将所有机器上的所有用户的散列algorithm更改为MD5。 有人可以提出一个方法,只需要最less或根本没有工作的用户。

你有点问这个问题:

将阴影哈希algorithm改为bcrypt:如何重新哈希

至less就从/ etc / shadow中的一个散列到另一个散列而言。 在你使用MD5之后,你最不工作的方式就是强制每个人都改变密码(尽pipe如此,使用类似SHA的东西也不会是件坏事)。

关于防止用户根据字典单词重新input密码,请查看在input密码时运行cracklib ,而不是追溯 。 这应该通过PAM完成(例如,pam_cracklib.so被调用以更改密码)以下是针对cracklib的CentOS软件包信息:

Name : cracklib Arch : i386 Version : 2.8.9 Release : 3.3 Size : 140 k Repo : installed Summary : A password-checking library. URL : http://sourceforge.net/projects/cracklib/ License : Artistic Description: CrackLib tests passwords to determine whether they match certain : security-oriented characteristics, with the purpose of stopping users : from choosing passwords that are easy to guess. CrackLib performs : several tests on passwords: it tries to generate words from a username : and gecos entry and checks those words against the password; it checks : for simplistic patterns in passwords; and it checks for the password : in a dictionary. 

对于SuSE来说,应该有这样一个包或者一个库。

这才是重点。 如果你担心人们得到你的密码哈希和破解(就像你正在做的那样),你应该使用更强大的哈希来使这个更加困难。

如果你不担心人们获得你的密码哈希值,你不应该浪费任何时间对它们进行哈希处理,而是将它们以纯文本的forms存储起来。

如果你想阻止你的用户select不安全的密码,最好是防止他们使用passwdqc之类的不安全的密码,而不是在与事实上的对手之间进行比赛。