1

I recently changed my password on my VMware Photon OS host. Now I want to reset it to the old one again, but passwd does not let me do it and displays the following message:

Password has been already used. Choose another.
passwd: Have exhausted maximum number of retries for service
passwd: password unchanged

Can I override this behavior?

0

2 Answers 2

3

Be aware that reusing old passwords may impose security risks.

The password history is stored at /etc/security/opasswd. You can either just remove the lines concerning specific users or delete the history for all users all at once:

cat /dev/null > /etc/security/opasswd
2

in addition to removing or clearing the /etc/security/opasswd file, look in /etc/pam.d/system-auth and /etc/pam.d/passowrd-auth and if it contains something resembling

password    requisite     pam_pwhistory.so use_authtok remember=24

just remove all instances of the remember=# for the time being to allow reuse of an existing password. Then once set you can restore the remember=#

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .