[CentOS] change sudoers remotely

Tim Dunphy

bluethundr at gmail.com
Mon Jul 8 20:32:23 UTC 2013


hello list,

 I've been asked to give someone sudo rights across an entire environment
without the benefit of something like puppet or chef or cfengine et al.

What I've come up with so far is this:


ssh -t miaprbicsra04v sudo -S /bin/echo "rsherman ALL=\(ALL\) NOPASSWD:
/sbin/service /bin/rm /usr/bin/du /bin/df" >> sudo tee /etc/sudoers


Right now that's just to one host, but I plan on substituting a list of
hosts once I get farther along. Problem is, the output hangs on the tee
command. Not sure why. Any suggestions?

Thanks,
Tim
-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B



More information about the CentOS mailing list