i created a script to find a user akshay1 on remote servers and if not there add the user, but its not working, could you please suggest« Back to Questions List

for F in $(cat /root/Desktop/serverlist.txt) ; do ssh "$F" a="grep -c 'akshay1' /etc/passwd" if [ $a -eq 0 ]; then adduser akshay1 else echo "user already there" fi done;
Posted by akshaymohan08
Asked on May 12, 2018 5:00 pm

Could you please share your script

Posted by Techie Globus
Answered On July 30, 2018 6:11 pm