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!

How to change password with a single command?

Status
Not open for further replies.

tporreca

IS-IT--Management
Jan 22, 2003
1
0
0
US
I need to automate password changes and thus be able to issue a single command without user intervention to change passwords. Problem is the passwd and pwdadm commands are interactive. I thought this would do it:

echo "mypass\nnewpass\nnewpass\n" | pwdadm user

It didn't.... sigh....

Thanks, Tim
 
I can only suggest that you write an "expect" script
 
Have you tried editing /etc/security/passwd directly?

userX:
password = VAKp.meZRAdRU
lastupdate = 1030525219
flags =

Change password for userX, note new password entry, replace password entry for other users.

You'll have to do it on the same day as you changed the original password, (something to do with seeds & salts etc etc.... ask you freindly cryptowotsoever)

best of luck
 
i use a freeware tool called "chpass"
but i can't remember where i have found it.
chpass username password
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top