This widget could not be displayed.
Operating System - HP-UX
1845515 Members
2952 Online
110244 Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
New Discussion
This widget could not be displayed.
This widget could not be displayed.

password aging - email warning

 
SOLVED
Go to solution
Lucy2009_1
Frequent Advisor

password aging - email warning

We have some accounts turned on password aging and set 1 week warning period. Is there any way to send email to notify the user that the password is going to expire?
7 REPLIES 7
Johnson Punniyalingam
Honored Contributor
Solution

Re: password aging - email warning

yes ,

is your system trusted system ?

you need to write a script by using below command

/usr/lbin/getprpw -l

and mailx to send email notification to the user that password going to expire,

Problems are common to all, but attitude makes the difference
Lucy2009_1
Frequent Advisor

Re: password aging - email warning

The system is not trusted. Just some accounts have password aging. I'll check that command.

Thanks!
balaji_vvv
Frequent Advisor

Re: password aging - email warning

Anyone is having script to do this on a trusted system, just send email to user before 7 days of expiry?
Lucy2009_1
Frequent Advisor

Re: password aging - email warning

Since the system is not trusted, the command did not go anywhere.
> getprpw -l XYZ
System is not trusted.

Anything else to try?

Johnson Punniyalingam
Honored Contributor

Re: password aging - email warning

for System is not trusted

man passwd,


To find out password dates use passwd -a -s, it gives you the date the password is changed and also it gives you the time

write script to check in reference with /etc/security file and send email notification to the users
Problems are common to all, but attitude makes the difference
Viktor Balogh
Honored Contributor

Re: password aging - email warning

here is small snippet:

# for user in $(pwget | cut -d: -f1)
do
[ $(passwd -s $user | awk '{print $NF}') \
-lt '10' ] &&
mailx -s 'change password!' $user
done

WARNING: I didn't test it, use it for your own responsibility!
****
Unix operates with beer.
Lucy2009_1
Frequent Advisor

Re: password aging - email warning

Thanks everyone. I got it.