I'm doing a script to create a DB user on all machines. I have no way of using sudo. This is for a cross section of sun machines.
i need to ssh to the server, then do a su to root, create the account and then exit. i have done the following:
## Script to create the mondba account ##
## Date 22Aug2007 ##
ssh -p 15560 user1@jupiter << EOW
su - root 2>&1
useradd -m -d /export/home/mondba -u 33332 mondba
Now the problem, I will be prompted for the user1 password but not the root password which i'm supposed to get as a result of the su - i'm executing. Instead i get su: Sorry, looks like it gets timed out. Please give me a hint.
Thanks in advance!