Some notes:
Every time you "echo $?", you are wiping out the return status (because
echo returns a success and changes $? to 0), so none of your if statements
will ever catch any errors.
Consider getting rid of the 'if' subtrees by negating your condition, which
will make it much easier to unders
Consider using the NOPASSWD option, on the remote systems, to allow this
particular use to run this particular script.
--
Mike Burger
http://www.bubbanfriends.org
"It's always suicide-mission this, save-the-planet that. No one ever just
stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1
Consider using the NOPASSWD option, on the remote systems, to allow this
particular use to run this particular script.
--
Mike Burger
http://www.bubbanfriends.org
"It's always suicide-mission this, save-the-planet that. No one ever just
stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1
Hello list,
I took another stab at finding a way to add a sudo user remotely and it
gets you most of the way there. If you execute the script as root it works
beautifully and does just what you want. Which is add the user to the
group and gives that user group rights to certain commands.
But if
4 matches
Mail list logo