[NCLUG] starting a script at startup as specific user?

J. Paul Reed preed at sigkill.com
Fri Apr 27 02:10:30 MDT 2001


On Fri, 27 Apr 2001, Gordon Forsythe wrote:

> Thanks, Mark.  Didn't know you could su to a specific user.  I'll look at
> the named script and get it figured out from there.  BTW, you assume
> correctly on the distro.

Just FYI, the -u and -g flags are named-specific; they aren't part of the
daemon function, so you can't use them anywhere else except for named.

If you want to run a script as a user on bootup, I'd suggest using su -c
with the appropriate flags and sticking that in /etc/rc.d/rc.local... which
is documented as follows:

# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

... which it sounds like you don't. Most people, including myself, don't
either. :-)

Later,
Paul
  ----------------------------------------------------------------------
  J. Paul Reed                preed at sigkill.com || web.sigkill.com/preed
  Homer no function beer well without.  -- H. Simpson, "The Joy of Sect"




More information about the NCLUG mailing list