Date: Wed, 14 Mar 2012 08:30:01 +0100 From: n dhert <ndhertbsd@gmail.com> To: freebsd-questions@freebsd.org Subject: start at boot, run as non-root Message-ID: <CAEFCw4s9rqaFgQ00APXuE0mpNtoDUQVOBT1wZzWbEi31NDXMtA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I have FreeBSD8.2. Sedna, an XML database server, had no port in th FreeBSD ports collection but has a binary compiled for FreeBSD8 on www.sedna.org. I installed that. To start it at boot I created a script /usr/local/etc/rc.d/sedna : ----------------------------------------------- #!/bin/sh # # PROVIDE: sedna # REQUIRE: DAEMON # KEYWORD: shutdown # . /etc/rc.subr name="sedna" rcvar=${name}_enable command=/home/opt/sedna/bin/se_gov load_rc_config $name : ${sedna_enable="NO"} run_rc_command "$1" -------------------------------------------- and added sedna_enable="YES" at the end of my /etc/rc.conf This way it starts at boot: $ ps -jaxww | grep se_ root 7064 1 7064 7064 0 Is ?? 0:00.00 /home/opt/sedna/bin/se_gov -background-mode off -listen-address localhost -port-number 5050 -ping-port-number 5151 -el-level 3 -alive-timeout 0 -stack-depth 4000 The deamon runs as root. I want it run by a non-root user, e.g. a user 'sedna'' How can I do that? The sedna server binary se_gov has no option in its man-page to start the program run as a different user ..
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAEFCw4s9rqaFgQ00APXuE0mpNtoDUQVOBT1wZzWbEi31NDXMtA>