run script as a user(ex: user1) at boot time
am 25.01.2008 10:43:25 von linux
I created a sym link to my shell script, to run while machine
restarts. But I need run my script as a normal user. But calling my
shell script through sysm link is making it run as root.
How can run my script as a user(ex: user1) while boot time/in
restarts.
Thanks
RGiripragada
Re: run script as a user(ex: user1) at boot time
am 25.01.2008 13:28:30 von Bill Marcum
On 2008-01-25, linux wrote:
>
>
> I created a sym link to my shell script, to run while machine
> restarts. But I need run my script as a normal user. But calling my
> shell script through sysm link is making it run as root.
> How can run my script as a user(ex: user1) while boot time/in
> restarts.
>
Use su or sudo or run it from /etc/crontab.
Re: run script as a user(ex: user1) at boot time
am 26.01.2008 21:16:18 von Rikishi 42
On 2008-01-25, linux wrote:
> I created a sym link to my shell script, to run while machine
> restarts. But I need run my script as a normal user. But calling my
> shell script through sysm link is making it run as root.
> How can run my script as a user(ex: user1) while boot time/in
> restarts.
Edit your cron jobs with:
crontab -e
.... and add the following line:
@reboot /home/myUser/MyScript
At each reboot, the script will run under your name.
--
There is an art, it says, or rather, a knack to flying.
The knack lies in learning how to throw yourself at the ground and miss.
Douglas Adams