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

Gordon Forsythe baohx_2000 at yahoo.com
Fri Apr 27 15:22:12 MDT 2001


Looked, and I don't have named in init.d, so I'm going to try the su x -c y
thing in rc.local.  My next question is since the script I am running will
continue running, should I start it under a new shell:
/bin/sh su x -c script
or should I add a & to the end of the line (don't know if that works in
scripts)?
I just don't want the machine to freeze up, since there will be a few things
to start up.

Thanks!

----- Original Message -----
From: "J. Paul Reed" <preed at sigkill.com>
To: <nclug at nclug.org>
Sent: Friday, April 27, 2001 2:10 AM
Subject: Re: [NCLUG] starting a script at startup as specific user?


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"

_______________________________________________
NCLUG mailing list
NCLUG at nclug.org
http://www.nclug.org/mailman/listinfo/nclug


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the NCLUG mailing list