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

Changing user passwords

Status
Not open for further replies.
Aug 10, 2000
37
GB
OK .. I login as root and change a users password. They are then able to login with this password but are immediately prompted for a new one .. I'd really rather that the passwd given by the root user was kept
Now I could remove the ADMCHG flag for the user from the /etc/security/passwd file to stop this happening but this seems rather untidy .. Anyone know if its possible to disable this feature ??

Cheers
 
Ok when you change the password, the first time they log on after the change. It will ask them to put in a new password, This will only happen once.

So just hit enter when you are going to change the password and when you log
on the first time put the new password in.
Hope this helps
Like this.

passwd jim hit enter
new password just hit enter
then hit enter one more time, jim will have no password now.
Now log on as jim and enter a new password then the next time jim will only have to put in his password and you are done..
Good luck..
 
Nice idea but I'm trying to reset a users password on a number of different platfroms via expect script.. AIX is the only Unix platform I've found that behaves in this way .. ie on a Sun box if user root changes jims password to foo then his password will be foo until it expires or he (or root) changes it ....

This leaves me with two options
1) Turn one simple expect script into one messy script
2) try and find a way of disabling this "feature"

 
The easiest way to do what you need is using the [tt]chsec[/tt] command:
[tt]
chsec -f /etc/security/passwd -s username -a flags=""
[/tt]

This will change the flags variable of user username in the passwd file to null. Try first analisig the previous value of flags...

I hope it works...
 
Chris,

I'd go for the ADMCHG flag myself, as long as you document why|how you're doing it there shouldn't be a problem -- just remember to make sure the code is revisited when you upgrade to the next version of AiX (or patch it for that matter) Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Cheers guys

I also found that pwdadm -c <uid> clears any flags in the user stanza... Still wish AIX wouldn't do things that I didn't ask it too ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top