Running a script at startup as root?
- by Usman Ajmal
Hi
i developed a script which I set to run at startup i.e. when the Desktop appears. In the script I mounted a partition using
sudo mount /dev/sda1 /mnt &> result.txt
After executing script a file named result.txt was created which contained
sudo: no tty present and no askpass program specified
In other words the mounting failed. If I run the script using sudo ./myProgram i don't face this problem and the drive gets mounted successfully.
Any suggestions please....