Use visudo to edit the sudoers file, but you just chose the most difficult service to give sudoer permission to, since it's smothered in java and abitrary calls to subroutines, ultimately what you want is lines in the /etc/sudoers to say something like
Code:svar ALL=NOPASSWD: /etc/init.d/tomcat6 /usr/share/tomcat6/bin/catalina.sh svar ALL= /sbin/start-stop-daemon /usr/lib/jvm/java-6-openjdk/bin/java /usr/lib/jvm/java-6-sun/bin/java /usr/lib/jvm/java- 1.5.0-sun/bin/java /usr/lib/j2sdk1.5-sun/bin/java /usr/lib/j2sdk1.5-ibm/bin/java
If you belive you trust your svar user with alot more permissions, something easier would be to add the user to the "sudo" group which automaticaly gives the user rights to perform any command as su.


Reply With Quote

Bookmarks