1 |
Am Sonntag, den 08.02.2009, 23:59 +0800 schrieb zhangweiwu@××××××.com: |
2 |
> Me as root user of a server wish to share the control privilege (to |
3 |
> start and stop) a daemon with another non-root user and find it |
4 |
> difficult. The requirement: 1) either me or him can start the daemon |
5 |
> then stop it; 2) he can stop the daemon started by me; 3) I can stop the |
6 |
> daemon started by him. |
7 |
> |
8 |
> 3) is very easy because I am root; 1) is also easy, difficult part is 2). |
9 |
> |
10 |
> I first thought of setting the process suid and make him owner of the |
11 |
> executable. However I found if I do so, the process starts with his |
12 |
> privilege while belonging to me, he could not signal the processes of mine. |
13 |
> |
14 |
> Is the requirement 2 possible with Linux? How? |
15 |
> |
16 |
> If the problem can be solved giving the setting two users both are not |
17 |
> root, the solution would be even more preferable. |
18 |
> |
19 |
> Thanks in advance! |
20 |
> |
21 |
Hello :) |
22 |
|
23 |
You can use app-admin/sudo to achieve your goal. It can be configured to |
24 |
allow certain users to execute certain commands as other users (possibly |
25 |
root). You can even restrict the allowed arguments to a command. |
26 |
|
27 |
Bye, |
28 |
Daniel |