Gurus,
I need to add a user to all the machines. I need a script to do this. I did one but it does not allow me to su to root within a ssh session i open. It exists saying su: Sorry. Please let me know how i can do it. I do not have the freedom of using sudo either.
Regards
Try using expect.
Cheers,
K
Thanks, shall try it. But does it require me to pass the password in or hardcode the passwd in the script?
u can pass the password as an environment variable if u dont want to hardcode them.
define all the variable in another file
and just execute the following command.
. /path/passwords.txt
ur password.txt may contain
user=myuser
password=mypassword
use $user and $password in ur orignal script.
Anchal
expect can use .rhosts file for remote host operations.
Cheers,
K