You are not logged in.
Pages: 1
I created a /etc/rc.d/ file for starting and stopping a http server. But I want start it as nobody instead of root. I am trying to use 'su' but I can't make it work... how should I?
Offline
I created a /etc/rc.d/ file for starting and stopping a http server. But I want start it as nobody instead of root. I am trying to use 'su' but I can't make it work... how should I?
I think most http servers have a User and Group setting in their config, so when run as root it will change to that user and group.
Offline
Well, maybe... But the point is more general... it is not only about the http server.
How can I start any program as nobody?
Offline
isn't it just
su user /path/to/bin
Offline
Putting the executable as setuid and changing the owner to nobody would work i guess.
Offline
I am not sure what firedance meant, but I found
su nobody -s'/full/path' works...
It seems su does not check if the shell is in /etc/shell when executed as root.
Offline
basically if you set the owner of /bin/someapp to nobody, then set the setuid bit of the /bin/someapp, ( think it's chmod +s) then everytime /bin/someapp is run it's run as that owner. Manyt people do this to allow shutdown as regular users -- set the setuid bit on /sbin/halt so that it always runs as the root user
Offline
Pages: 1