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 successfully

However, the password change has no effect after leaving the terminal, and my old password is still the only one recognized.

Any ideas?


  • The result shows that your password has been updated sucessfully. Just logout and login back to confirm. – karthick87 May 21 '11 at 14:10
  • I've logged out and back in, and rebooted my machine. No effect - the old password remains. – user999 May 21 '11 at 14:14
  • 1
    What version of ubuntu you are using? Try changing the user password using GUI method. – karthick87 May 21 '11 at 14:18
  • Thanks for your help. Using 11.04. Unfortunately, the GUI method doesn't allow a 'similar' password. If what I've done above is seemingly correct, then I'll just need to choose a different type of password. I'm just surprised the sudo method isn't working for me. – user999 May 21 '11 at 14:30
  • 1
    @user999 I can even change my password without it nagging about it being too short (used 1 letter to test ;)) or it being the same as used before or even being the same password as it already is. – Rinzwind May 21 '11 at 14:52

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.


A 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).

  • If using the workaround, remember that there are other limitations to be aware of in more recent versions of Ubuntu. "New password is too simple" and "You must choose a longer password" are just two. – Kelly Bang Feb 26 '17 at 6:23
  • 1
    also, note that some systems are configured to not let you change the password more than once a day, in order to avoid exactly this (stupid corporate rules). So make sure you save that temporary password well – Ciprian Tomoiagă Dec 19 '19 at 13:55

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 Age to 0 and set Maximum Password Age to 99999 to keep your current password indefinitely and don't want it to expire.

More info: Ubuntu Server Guide - Ubuntu User Management: Password Expiration


https://help.ubuntu.com/12.04/serverguide/user-management.html 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?

  • 4
    Hi OJW! Your post doesn't seem to attempt to answer the question. Did you mean this as a comment to 13east's answer? – Alaa Ali Aug 20 '13 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.