Linux – How to force change linux password even if similar as previous

linuxpasswordrhel

I am trying to change my current password in Red Hat Enterprise Linux Server release 5.10 (Tikanga)
but it says my new password is too similar. Is there any way to force change ?

$ passwd
Changing password for user XY
Changing password for XY
(current) UNIX password:
New UNIX password:
BAD PASSWORD: is too similar to the old one
New UNIX password:

Best Answer

If you can run the command as root, you can force the change to be accepted.

Example:

$ sudo passwd myusername
Changing password for user myusername.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
Related Question