NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rc and login classes



It's not the same. Irregardless you are running the script as user root and class tor. Then the script executes the daemon as `user`. I don't know if it will have the desired effect, but perhaps do
# usermod -L tor tor_user. Change tor_user to the correct user.

Sent from BlueMail
On Jul 7, 2017, at 3:10 PM, Alexander Nasonov <alnsn%yandex.ru@localhost> wrote:
Edgar Pettijohn wrote:
Look at rc.subr. it calls su to start the daemon. Look at the
manual for rc.subr I think there are some variables you could add
to the rc.d script to change the behavior.

I only see su -m user -c ... in rc.subr. It's not the same as su -c class user.

$ man su
..
When a -c option is included after the login name it is not a su option,
because any arguments after the login are passed to the shell. (See
csh(1), ksh(1) or sh(1) for details.) To execute arbitrary command with
privileges of user username, execute:

su username -c "command args"


Home | Main Index | Thread Index | Old Index