How to recycle old passwords by modifying /etc/passwd file ?

hi, has anyone here tried to recycle old passwords by copying something out of the passwd file and paste them back into the same passwd file ?

can it work this way ?

some of our applications passwords are expiring but they cannot be change due to application concerns, so therefore we must retain them.

:smiley:

I think you should only disable expiration of passwords for those applications, using:

passwd -x -1 app_user

we can't do that because of audit reasons, there must be expiration of passwords but we can don't reveal that we are using the same passwords

Then why not just setting the new password to be the same as the old one ?

can't, there is a policy in place to prevent that.

what i heard is that we could copy the encrypted string and paste it again, not sure does it work this way.

You certainly can as root isn't subject to password policy restrictions.

This would work but it is more complex and error prone.

think i am going to create a dummy account and try experimenting it

Hi,

The simplest method is to modify the third field on the file /etc/shadow.
This field correspond to the date of the last modification.
Just increase it with the number of days the password is valid.

hope it help you :slight_smile: