1833238 Members
2803 Online
110051 Solutions
New Discussion

Checking the password

 
SOLVED
Go to solution
Willie Wright
Advisor

Checking the password

Hi,

I'm trying to write a script that will check the /etc/passwd file nightly and notify users by e-mail 14 days before there password expires. Any ideas would be helpful.

Thanks
I like UNIX
1 REPLY 1
S.K. Chan
Honored Contributor
Solution

Re: Checking the password

I do not have the script to do this but I can give a couple of pointers. Use the command 'logins' to determine the password aging information (you may have knew this already), it'll help simplified the password aging calculation. For example ..
# logins -x -l skchan
skchan 2100 users 200 SKChan,IT,,
/home/skchan
/usr/bin/sh
PS 100301 14 182 -1

The above ..
1- password last change on 10/03/01
2- minimum time between changes 14 days
3- password expiration 182 days