Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
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
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
@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

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

share|improve this answer

For me I was able to avoid this message:

Bad: new password is just a wrapped version of the old one

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.

share|improve this answer
Thank's man, that works! – somethingSomething Sep 17 '14 at 0:14 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?

share|improve this answer
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

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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