View previous topic :: View next topic |
Author |
Message |
Voltago Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/5021960813fd4cfeb02cbe.jpg)
Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Wed Apr 06, 2005 2:20 pm Post subject: Starting a service as unpriviledged user |
|
|
Hi all!
I wanted to let an unpriviledged user start and stop sshd, so I wrote this script
Code: | #!/bin/bash
/etc/init.d/sshd start
|
and suid'ed it
but now /sbin/runscript.sh complains that I "must be root to run init scripts". Is there a simple way to get this working without using sudo (and of course withount suid'ing runscript.sh)? Thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mens Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/15205672014251375942aa1.jpg)
Joined: 27 Aug 2003 Posts: 392 Location: Belgium
|
Posted: Wed Apr 06, 2005 3:20 pm Post subject: |
|
|
suid'ing a script is not gonna change the $EUID of the user executing it - which is what runscripts checks on - sudo will do that, so I'm afraid you will either have to sudo or create your own startup-script without runscript. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Voltago Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/5021960813fd4cfeb02cbe.jpg)
Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Wed Apr 06, 2005 4:58 pm Post subject: |
|
|
OK, thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|