[SLE] running a script as another user
I need to setup a script to start a program at bootup. The program has it's own user account and need to be run under that user's UID. What I plane to do is create a script names, say 'server', that is placed inside of the /etc/rc.d directory that will call another script, say 'runserver', which will run the program. I would like the script 'runserver to be executed under the user account created for the server. How would I do that? The reason for the two scripts is that the 'runserver' will not exit until after the program exist. The program does not do anything like create a lock file or create a file with it's PID that I can check to see if it is running. The 'runserver' will first create a lock file, execute the server, and once the server exits, it will delete the lock file and exit. The 'server' script will check for the lock file before trying to start or stop the program. -- Sam Carleton ------------ http://www.bigfoot.com/~scarleton (Homepage) http://www.uptimes.net/hostinfo.html?hid=1218 (Linux Box) -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Fri, Jan 14, 2000 at 16:34 -0500, Sam Carleton wrote:
I need to setup a script to start a program at bootup. The program has it's own user account and need to be run under that user's UID. What I plane to do is create a script names, say 'server', that is placed inside of the /etc/rc.d directory that will call another script, say 'runserver', which will run the program. I would like the script 'runserver to be executed under the user account created for the server. How would I do that?
Try u - <user> -c '<program> &' Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (2)
-
activex1@one.net
-
sttr@sttr.de