I have a Python script that needs to mount disks on an Ubuntu server without root privileges.
I made the script executable (with #!/usr/bin/env python
). I also renamed it to '.sh' (probably not important), and chmod
it to be executable.
Then, I entered the following line to my sudoers file:
ALL ALL = (ALL) NOPASSWD: /home/sazulay/.scripts/mount_disks.sh/
If I remove the last '/' ,visudo claims I have a syntax error.
If I leave it like that and run the following line from my user:
sudo /home/sazulay/.scripts/mount_disks.sh
I am still prompted for password, which was exactly what I was trying to avoid.
What am I doing wrong?