[vox-tech] running service as a different user

vox-tech@lists.lugod.org vox-tech@lists.lugod.org
Tue, 9 Jul 2002 13:24:27 -0400


Patrick,

On Tue, Jul 09, 2002 at 11:58:58AM -0400, Patrick Stockton wrote:
> I'm using Mandrake 8.2 and have compiled the jabber server from source.

  If you are using Debian the packaged jabberd runs as user daemon and
uses port 5222 which is a user bindable port.  The jabberd process 
doesn't appear to need any root permissions to start because I can
see the startup script switches into the "daemon" user before starting
jabberd.  There is no reason one couldn't make a new group and switch 
the debian startup script to use that custom user.

> How can I have the system run the jabber service as a different user?

  In your case you will need to modify the startup script you use.
If you could send the script you use to start/stop jabberd now
that would be the easiest.

> Is there some sort of wrapper I can use?

  On Debian there is a program called "start-stop-deamon" which
handles all the stuff like creating/removing a pid lockfile, 
switching user id's, chroot'ing, and all the other fancy things
you may want to do to a deamon.  I can see this is part of the
main debian package management package (dpkg) so it's not likely
to be on your machine...

  Most likely you won't have that program and will have to use "su"
to switch users before starting the jabberd process.

=====
- Please send the start/stop script you use now.
- Check if you have a program named "start-stop-deamon" on your machine?
=====

    Later,
      Mike