how to redirect STDIN to hp-ux's passwd
I have this script that will auto fill in the password for a new account created in the system:
Code:
echo $PASW1 | passwd --stdin userid is it -n? didn't work. |
HP-UX passwd command does not allow for stdin because it is an interactive command.
There are some ways to automate this - there is a good discussion here: http://forums13.itrc.hp.com/service/...hreadId=899229 |
Expect is your friend. You can use this code.
Code:
#!/usr/bin/expect |
I see; I will research more into 'expect'. This command/phrase is totally new to me.
thanks! |
All times are GMT -5. The time now is 05:00 AM. |