[NTLUG:Discuss] Run Program as User From Init Scripts

Jack Snodgrass idiotboy at cybermail.net
Thu Aug 16 06:07:17 CDT 2001


Not sure of the exact syntax, but you'll want to use the 'su' command. 
Something like 
su - username -c "command to run" 
do a man su to get the syntax. 

jack

----- Original Message ----- 
From: <lee at brave.com>
To: <discuss at ntlug.org>
Sent: Thursday, August 16, 2001 5:34 AM
Subject: [NTLUG:Discuss] Run Program as User From Init Scripts


> i'd like to run a program as a user from the init boot scripts.  for
> instance, i'd like to run fetchmail at boot time, but i don't want to run
> it as root, and besides, fetchmail is very picky about who runs the
> program (my config for fetchmail is in my home directory).
> 
> so how do i manipulate a rc.local file in the init scripts to call
> fetchmail (or any other program) but run it as a particular user?
> 
> TIA
> 
> -- lee
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
> 




More information about the Discuss mailing list