Click to See Complete Forum and Search --> : Simple bash stuff


BOFH1
09-28-2003, 11:06 PM
I know this is probably one of the simplest things there is, but I need to know how to run a bash script as another user other than root (ex. an eggdrop bot as user eggie) in the rc.local file. I'm not quite sure of the command syntax. I know it goes something like this:

bash -c ./dir/program

but I don't know how to add in the username/password/any other variables.

Any help will be greatly appreciated. Thanks in advance.

serz
09-28-2003, 11:23 PM
You could use su to do this, but you will be prompted for the password.

su user -c command