-   Linux - Software (
-   -   Who can run the daemon ? (

thomas2004ch 07-26-2012 05:14 AM

Who can run the daemon ?

I have a script which contains a command:



As I run this script under root there is no problem. But as I run this script under other user I got error as:


runuser: cannot set groups: Operation not permitted
Can only root run the daemon?


pan64 07-26-2012 07:03 AM

obviously yes

thomas2004ch 07-26-2012 08:51 AM


Originally Posted by pan64 (Post 4738490)
obviously yes

But if I add the user to the sudoers?

Sydney 07-26-2012 09:17 AM

If you sudo the script without adding a -u option you will still be running it as root, just without the environmental variables of root and without having to log in as root. It is not clear if that would be the intended result from your question.


Last login: Thu Jul 19 22:18:09 2012
user@server:~$ sudo whoami
[sudo] password for user:

chrism01 07-26-2012 09:13 PM

You can use the RUNAS option in sudoers file to cause it to run as root.

All times are GMT -5. The time now is 08:56 PM.