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
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