Languages
[Edit]
EN

Linux passwd solution for - BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word

8 points
Created by:
Teilsa
1315

Hi, today I would like to show you how we can fix the problem when we need to change the password in linux for less secure but we get an error:

Problem description

Edit

Today I needed to change the password, so I used passwd command as alwasy to change password in linux (in my case centos) system. The problem was that I needed to change the password for less secure one, because integration test required it. For example when we want to change password for 'test123' we will get this error, because password is too easy to guess and hack it.

My console error:

Solution

Edit

The solution for this problem wasn't that obvious, but it is very simple. Follow below steps in order to be able to change password for less secure in linux.

1. Login to root account.

2. Edit: vim /etc/pam.d/system-auth

3. In this file we need to change 2 things. Comment out 1 line and remove 1 parameter.

4. Comment out this line:

In your linux system it may look a bit different, but first 2 parameters will look the same:

password   requisite

5. Remove use_authtok from this line (in my case last parameter in this line):

Same as above, this line may look a bit different, but first 2 parameters will look the same:

password    sufficient

6. Write and quit (:wq in vim)

7. We don't need to reboot system, we can change the password right away.

And our password is changed to less secure.

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Linux

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join