[NTLUG:Discuss] crontab issue

Rusty Haddock rusty at fe2o3.lonestar.org
Wed Mar 14 16:21:28 CDT 2007


Fred James wrote:
    >All
    >If I use a crontab entry such as
    >
    >42 * * * * su - username -c /home/username/program argument1 argument2 
    >argument3 2> /tmp/errorfile

If this is the system crontab (in /etc) then the 6th field
is a user name to run the program as.

And don't use the '-' argument to 'su'.  This makes the shell a login
shell and I'm sure it's is expecting stdin to be attached to a tty line.

	-Rusty-
-- 
   _____       Rusty Haddock  =  KD4WLZ/AE  =  rusty at fe2o3.lonestar.org
|\/   o \   o  **Out yonder in the Van Alstyne (TX) Metropolitan Area**
|   (  -<  O o     Every day I think people can't get more stupid.
|/\__V__/               Every day I'm proven horribly wrong.



More information about the Discuss mailing list