How to force user to change password after expiration in Linux?
Linux - NewbieThis forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
In Linux system, I have the password aging set to 2 days in /etc/login.defs. I created a user and password. After 2 days, when I try to login, the user is locked out because of password has been expired. Is there a way that can allow the user to login after the password expires, but force the user to change the password after login and the user is not allowed to do anything without changing a new password?
IF your using shadow suite, then simply set the inactive to how many days after the password expires to allow the user to change it. 0 means never make the account inactive.
I tried this, but I still can not login after the user password is expired, and there is no way to change password for the user except login as root. Is there any other way or script or so can do the thing as I expected?
I also tried to use "passwd -e user" to expire a user and see if the force password changing functionality work, but I don't see the prompt to force me to change password. Is my linux system or PAM module has problem? or there is any configuration I need to change to see the force prompt? or I need other modules to make work? How to debug/fix this issue?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.