Find the answer to your Linux question:
Results 1 to 2 of 2
We currently have a customer which requires our service's state to be modifiable via non-root users (e.g. stop/start/restart). What is the preferred way of accomplishing this on linux? Running the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2012
    Posts
    1

    Linux service script execution via non-root users


    We currently have a customer which requires our service's state to be modifiable via non-root users (e.g. stop/start/restart).

    What is the preferred way of accomplishing this on linux? Running the /etc/init.d/foo script directly doesn't work because the user does not have permissions to touch the /var/lock/subsys/ lock.

    Along these same lines, do programs which support 'service' scripts allow control via other paths?

    e.g.
    service sshd start
    -vs-
    /usr/sbin/sshd

    If so, how can graceful shutdowns be supported since the /var/lock/subsys locks are not touched?

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Look into SUDO. There you can give normal users the rights to execute programs and at the same time you can limit the programs they are allowed to execute.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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