I have been looking all over for a simple way to combine various scripts to do this.  I am not the strongest at scripting but I am working on improving so go easy on me.  Any assistance here is appreciated.I am not the author of this but I am using it as a start. I'd like to understand what the best approach to running this against a list of ips would be.  I'm most interested in simplicity and understanding if a user exists already and if it errors out.#!/bin/bash# Script to add a user to Linux systemif [ $(id -u) -eq 0 ]; thenread -p Enter username :  usernameread -s -p Enter password :  passwordegrep ^$username /etc/passwd >/dev/nullif [ $? -eq 0 ]; then    echo $username exists!    exit 1else    pass=$(perl -e 'print crypt($ARGV[0], password)' $password)    useradd -m -p $pass $username    [ $? -eq 0 ] && echo User has been added to system! || echo Failed to add a user!fielseecho Only root may add a user to the systemexit 2fi
Seeking a script that can loop ssh to a list of ips and perform useradd, home directory, creation and the user to the sudoers file
useradd