You are not logged in.

#1 2007-03-27 11:04:31

rixxon
Member
Registered: 2007-03-09
Posts: 16

How to run commands upon system boot as user?

How can I as a user run commands upon system boot? In Vixie's cron, one can use the @reboot syntax in a crontab, and the job is ran every time the cron daemon starts. Arch however, uses Dillon's cron which seems not support this feature.

Offline

#2 2007-03-27 11:18:40

stb
Member
Registered: 2007-03-13
Posts: 40

Re: How to run commands upon system boot as user?

How about su -c <COMMAND> <USER> in /etc/rc.local?

Offline

#3 2007-03-27 11:22:38

rixxon
Member
Registered: 2007-03-09
Posts: 16

Re: How to run commands upon system boot as user?

stb wrote:

How about su -c <COMMAND> <USER> in /etc/rc.local?

I would prefer if root was not required.

Offline

#4 2007-03-27 11:53:52

bwalk
Member
Registered: 2007-03-21
Posts: 177

Re: How to run commands upon system boot as user?

Hmm, does not work, because root owns init, so everything requires root. stb's version is valid, the -s parameter drops privileges to <USER>, spawns a shell and executes <COMMAND>. So, no security problem whatsoever.

Offline

#5 2007-03-27 17:19:35

rixxon
Member
Registered: 2007-03-09
Posts: 16

Re: How to run commands upon system boot as user?

bwalk wrote:

Hmm, does not work, because root owns init, so everything requires root. stb's version is valid, the -s parameter drops privileges to <USER>, spawns a shell and executes <COMMAND>. So, no security problem whatsoever.

So there is nothing like @reboot in vixiecron?

Offline

Board footer

Powered by FluxBB