I receive this message when trying to change my password:
"Bad: new and old password are too similar"
The passwords' "similarity" is irrelevant for my needs, so I'd like to bypass this.
I tried sudo passwd $my_username
I thought this had worked because I got a message:
passwd: password updated successfullyHowever, the password change has no effect after leaving the terminal, and my old password is still the only one recognized.
Any ideas?
thanks
104 Answers
For me I was able to avoid this message:
Bad: new password is just a wrapped version of the old one (and a few other similar messages)
by running $sudo passwd <my_username> instead of just $ passwd
Just obviously be aware of the security implications but at least it allows it now.
1A workaround would be to change the old password to a random one, and change it again to a similar one. The password history is not preserved, so this should work fine.
If you need a real solution, please include the contents of your /etc/pam.d/common-password and /etc/pam.d/chpasswd (preferably using a pastebin).
sudo chage -l username
- Use this command to view your current password expiration policies.
sudo chage username
- Use this to get change the different password expiration policy fields; set
Minimum Password Ageto0and setMaximum Password Ageto99999to keep your current password indefinitely and don't want it to expire.
More info: Ubuntu Server Guide - Ubuntu User Management: Password Expiration
doesn't seem to list the relevant options - it mentions /etc/pam.d/common-password but without details of what precisely is meant by rule-sets like nullok_secure or what other rule-sets are available.
Mentioning a document like man pam_unix might be useful here?