Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Starting a service as unpriviledged user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Wed Apr 06, 2005 2:20 pm    Post subject: Starting a service as unpriviledged user Reply with quote

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
Code:
chmod a+rx,u+s

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
View user's profile Send private message
mens
Guru
Guru


Joined: 27 Aug 2003
Posts: 392
Location: Belgium

PostPosted: Wed Apr 06, 2005 3:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Wed Apr 06, 2005 4:58 pm    Post subject: Reply with quote

OK, thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum