Results 1 to 7 of 7

Thread: /etc/sudoers permission to access a service

Hybrid View

  1. #1

    /etc/sudoers permission to access a service

    Hello,

    The tomcat installed under the user tomcat. I want to allow a particular user say svar to access the service(start or stop the service).

    I also want the user(svar) to login as tomcat user without password. I know it has to be done in /etc/sudoers.. can please anyone say me how can to do it?

  2. #2
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811
    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.
    Don't worry Ma'am. We're university students, - We know what We're doing.
    'Ruiat coelum, fiat voluntas tua.'
    Datalogi - en livsstil; Intet liv, ingen stil.

  3. #3
    Thanks for the reply, how to add the sudo user?

  4. #4
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811
    # usermod -G sudo svar
    Don't worry Ma'am. We're university students, - We know what We're doing.
    'Ruiat coelum, fiat voluntas tua.'
    Datalogi - en livsstil; Intet liv, ingen stil.

  5. #5

  6. #6
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811
    Yes it's a group... If your using ubuntu it might be called wheel.
    Don't worry Ma'am. We're university students, - We know what We're doing.
    'Ruiat coelum, fiat voluntas tua.'
    Datalogi - en livsstil; Intet liv, ingen stil.

  7. #7
    Hey.... Thanks

    It has been very helpful :-)

Similar Threads

  1. NFS & NIS: permission denied
    By dgermann in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 02-28-2006, 03:48 AM
  2. SMB permission propagation?
    By Tyr_7BE in forum Linux - Hardware, Networking & Security
    Replies: 17
    Last Post: 02-21-2005, 12:06 AM
  3. permission errors
    By Dswissmiss in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 07-29-2004, 06:33 PM
  4. permission denied
    By rwtoften in forum Linux - General Topics
    Replies: 4
    Last Post: 06-10-2002, 02:57 AM
  5. permission denied, wtf?
    By boblucci in forum Linux - General Topics
    Replies: 20
    Last Post: 11-30-2001, 12:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •