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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reseting all users passwords and login settings

Status
Not open for further replies.

macrun95

Technical User
Dec 5, 2005
28
0
0
US
Due to meeting the requirements of a recent audit, I need to change some of the login parameters (minage, maxage, etc.) on all my lpars. I also need to reset all the users passwords so that the next time they login they will be required to change it to meet the new parameters.

I've tried several different ways to do this with some scripting and the passwd command but to no success.

Can anyone suggest some easy ways to to do this. I have 40+ lpars all running AIX 5.3.

Thanks in advance,

Eric
 
Show us what you have tried and why it didn't work and we'll try and give you some pointers.

chuser should take care of the min/maxage change and passwd should promt for the reset at nxt login.
 
force user to change password
chsec -f /etc/security/passwd -s user -a "FLAGS=ADMCHG"

Tony ... aka chgwhat

When in doubt,,, Power out...
 
This is what I did on my test system. When I ran it, it prompted me for a password for each user. I don't want it to do that I just want to force a password change.

users=`lsuser ALL | awk '{print $1}'`
for i in $users
do
passwd $i
done
 
This is what I did this time and it worked. However, instead of using the lsuser command I'm going to create a text file of logins as input.

users=`lsuser ALL | awk '{print $1}'`
for i in $users
do
chsec -f /etc/security/passwd -s $i -a flags=ADMCHG
done
 
To set the "Change Password" flag, you can use pwdadm command. Also you can reset the passwords of all users using chpasswd command, which reads <username>:<password> pairs from standard input. It can also clear passwd flags, or read encrypted passwords.

--Trifo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top