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?