Resolve and Remove "BAD PASSWORD: It is Based on a Dictionary Word "in Linux

如果修改的是root的密碼則即使有錯誤提示也可以修改成功的,但是對於一般的用戶則不會成功,解決方法如下:

Resolve and Remove “BAD PASSWORD: it is based on a dictionary word “in Linux
If you know what you’re doing and want to use weak password in Linux (CentOS, RedHat … etc), follow the steps below.

1. vi /etc/pam.d/system-auth as root.

2. Look for the following two lines:

password    requisite     pam_cracklib.so try_first_pass retry=3
password    sufficient    pam_unix.so md5 shadow nullok try_first_pass use_authtok

  1. password    requisite     pam_cracklib.so try_first_pass retry=3

  2. password    sufficient    pam_unix.so md5 shadow nullok try_first_pass use_authtok

 3. Comment out the first of the two lines:   註釋掉此行

#password    requisite     pam_cracklib.so try_first_pass retry=3

4. Remove use_authtok on the second line. Otherwise you’ll get “passwd: Authentication information cannot be recovered” error.

刪除掉 "use_authtok “從第二行,否則你會得到"passwd : Authentication information canot be recovered "的錯誤提示
password    sufficient    pam_unix.so md5 shadow nullok try_first_pass

5. That’s it. Try changing your password again.

 搞定,再次嘗試修改密碼()

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章