-2

I want to give certain users on my server access to run commands as apache, but I don't want to give them full root access.

Is there a way to allow a user to run a command similar to sudo -u apache ... while preventing them from having root permissions?

3
  • Why the down vote?
    – ajon
    Apr 1, 2014 at 21:17
  • I thought he just didn't want to give them full root access. If you really want to give them this power without sudo then, uh... Why?!
    – faker
    Apr 1, 2014 at 21:28
  • 1
    @ajon - hover over the downvote arrow. This is very rudimentary sudo stuff, and the downvote is likely due to the fact that you show no research effort on an issue that would have been easily sorted out with a simple web search.
    – EEAA
    Apr 1, 2014 at 21:45

1 Answer 1

3

Yes, of course, this is exactly what sudo is for. e.g.:

ajon  ALL=(apache) /bin/ls

Allows the user ajon to run sudo -u apache /bin/ls.
See man sudoers.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .