[wellylug] Proper way to start program with correct uid from init.d?
Damon Lynch
damon at photo.geek.nz
Mon May 3 00:46:58 NZST 2004
Hi,
Here is a snippet from within a /etc/init.d file that I've created:
sudo -u zope -H vncserver :1 -depth 16 -geometry 640x480 2>/dev/null 1>&2 && success || failure
It 'works' in the sense that the vncserver program starts up -- but many
of the programs in the vnc session don't work properly. For instance
OOo can't save any files. When I start vncserver when I've logged into
a shell as user zope, they work just fine. Thus the problem appears to
be with me abusing the role of sudo, or at least using it in the wrong
context.
All I'm really trying to do is start some programs as a non root user at
startup time. How do I do this?
Thanks :)
Damon
More information about the wellylug
mailing list