linux , immediately expired password

I need to confirm that all new user created should Immediately expire new and manually reset passwords

how to check this in linux machine
apunkabollywoodAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

stranger9002Commented:
for example by passwd -e raj
0
stranger9002Commented:
according to http://www.linuxheadquarters.com/howto/basic/adduser.shtml
in Red Hat there is possible adduser with -e (expiration), but it's not in Debian so I can't try it, but if it means expiration of the password it should do the job. Something like:
adduser user -e `date '+%m/%d/%y'`

0
JordanH155Commented:
You can do "chage -d 0 (user)" to force the user to change the password at next login.  This is how it is done on RHEL.

To check you would have to look at the user's line in /etc/shadow.  The fields are seperated by ":".  The first field is the user name, the second is a password hash, and the third is the expire days.  If the number is 0, then they will have to change on the next login.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.