user security setting

Latest response

I need to block user if not used in the same day of creation or reset

Responses

You'd have to use the "chage" command to set expiration to 1 day then run a job to check /var/log/secure for a message showing the password had been changed. If you don't see that you leave it expired in 1 day otherwise you use "chage" again to change the expiration.

Type "man chage" for details of that command.

Type "man passwd" for other options that command provides.

Type "man at" to see how to schedule a job to run a day from now. You can set this "at" job to check /var/log/secure and run the chage if you see the password was changed.

The log entry in /var/log/secure will be something like:

secure:Apr 26 09:45:00 passwd: pam_unix(passwd:chauthtok): password changed for

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.