Hi All,
Need help for writing an automation script. Yet I had written a script but its not working,
Quote:
#!/bin/bash
#copying files from local machine to remote server by scp
scp -r /useradd.sh user@172.29.16.19:/home/user
# Second step making ssh login for executing the script on remote server
ssh@172.29.16.19
# switching user account
su - root (script should run as root)
echo "password"
./home/user/useradd.sh (executing the script)
finally i have to capture a log of the script process.
|
This is my script for automation, Were i have run the "useradd.sh" script on the remote servers from my local machine.Kindly help me to write a clear script.
Thanks in advance.