Operating System - Linux
1828046 Members
1869 Online
109973 Solutions
New Discussion

Script for password aggining and forcible change

 
johnreid
Contributor

Script for password aggining and forcible change

Hello ,

I have 50 user whose accounts were already created in 20 servers , but we were misssout the password forcible change and password agging, Please help to get the script for this activity , You are most appriciated.

Regards
John.
2 REPLIES 2
Shrikant Lavhate
Esteemed Contributor

Re: Script for password aggining and forcible change

A script by Clay may help you:
check this link
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1132526&admit=109447627+1197637026655+28353475
Will it remain a personal, if I broadcast it here!
James R. Ferguson
Acclaimed Contributor

Re: Script for password aggining and forcible change

Hi JohN:

Given a file of the account names, one per line; call the file 'mynames' and do:

while read NAME
do
passwd -x 30 ${NAME}
done < mynames

...This will set the password expiration time to 30-days.

See the manpages for 'passwd' for more information.

Regards!

...JRF...