Click to See Complete Forum and Search --> : sysinit question


ansivirus
01-13-2001, 04:53 PM
I was just wondering what "user" is being used to run the programs specified in the inittab because I am trying to have a program load during boot and that is the only place I know to put it but this program requires me to specify the users that can use it so I specified ansivirus and root can use it but it doesn't work.. any suggestions?

-ansivirus

andrzej
01-13-2001, 06:40 PM
inittab is NOT the place to put your programs in. Look for something called /etc/rc.d/rc.local
(Note: the above location is strongly distro-dependent).
edit: OK, you may run programs from inittab. As root. Look at the 'How I did it' forum. There is an excellent post on this subject.

[This message has been edited by andrzej (edited 13 January 2001).]

ansivirus
01-13-2001, 07:24 PM
Added it in the rc.local file instead but I will still need to know what user is being used to start it.. is it root?

-ansivirus

PLBlaze
01-13-2001, 07:31 PM
As Andrzej suggested it's always better to run from rc.local (that's the purpose of rc.local).To answer your other question is rather simple,what user runs the program it depends on who owns it.If your program is owned by root and groop root it will run as root unless you want to run it as other UID/GID.
You can check the ownership by running either top or doing ps auxw | grep 'program name'

Craig McPherson
01-13-2001, 10:58 PM
Here's a rule:

* Inittab is for starting INTERACTIVE programs, like shells, and graphical login programs.

* The various startup scripts are for starting NONINTERACTIVE programs, like servers and daemons.

Anything you start will be run as root, unless you do something to keep that from happening... like using "su username" to start the program.

ansivirus
01-14-2001, 11:06 PM
root user owns along with root group and It isn't running as root no matter where i put it..... is there a specific way to specify what user runs it?

-ansivirus