Click to See Complete Forum and Search --> : change password in one go


vikas027
06-09-2008, 06:23 AM
Hi all,

I need to change the password of any user in one go.

For example in Linux we have two options :-

Code:
(echo "username:password") | chpasswd
or
echo $PASS | passwd $USER --stdin

This changes the password without prompting. Actually, I need to make a script which adds a user and then sets a password to it.

I have made it for Linux but now I require it to run on other Unix boxes also. I don't have option to install any other utility (like expect).

Pls can someone give Solaris+HPUX+AIX equivalent of the command.

Thanks in adv.

VIKAS

ehawk
06-12-2008, 02:18 AM
For Solaris, maybe this will help:

http://www.unixreview.com/documents/s=1780/urm0111f/

vikas027
06-12-2008, 02:50 AM
For Solaris, maybe this will help:

http://www.unixreview.com/documents/s=1780/urm0111f/


Thanks ehawk, trying this. Seems good :)