[sudo-users] Appending lines to sudoers?
shott at snf.stanford.edu
Mon Jul 5 14:46:37 EDT 2004
Sudo Fans and Wizards:
We have a Java application that uses Sudo in a couple of different ways:
1. From within our ant build, we call ant again as "root" (using "sudo ant ant-target") that allows the installation part of the build to be run as root without running ant twice ... once as the builder and once as root.
2. We also use sudo so that the the main "administrative" server can start all of the other sub-servers in our system so that each is owned by the proper user ... using an appropriate definition of Runas_Alias.
This is all very cool and works nicely!
As we are deploying this to other sites, however, I'm a bit worried about whether other places may be able to properly setup their sudoers file using visudo. What I'd like to do is to generate the appropriate sudoers lines to be added for this application as a part of our build process and then be able to call visudo (or equivalent) and effectively add these lines to the sudoers file if they aren't already there. In other words, I'd like to automate the addition of the 6-8 of sudoers aliases that I need without disturbing pre-existing definitions ... but without requiring manual typing of the alias definitions. Is there a convenient way of doing this?
More information about the sudo-users