Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple script to change password on AIX 6,1

Status
Not open for further replies.

shoux

Technical User
Nov 9, 2000
83
MY

Hi all,

good day to all

I have 750 users and i need to run the below command to force user change their password. can someone help me for a simple script. I have a user listing from /home output. ie. (output from "ls -l|awk -F " " '{print $9}' > /tmp/userlist.1"

$ pwdadm -f ADMCHG user1
$ pwdawm -f ADMCHG user2
......
......
$ pwdadm -f ADMCHG user750


hopefully someone can help me.

Thank you in advance.


shoux
 

Hi all,

finally, i got this command from Google. it work ! even though there is error message at the end.

$cat userlist.1|while read name
>do
>pwdadm -f ADMCHG $name
>done

Usage: pwdadm [-R load_module] [ -f flags | -q | -c ] user


Problem solved.

Thank you all.




shoux
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top