I wrote a script that prompts me in dmenu the availible drives to mount or unmount and I added to the with visudo
the following line
ALL ALL = NOPASSWD: /path/to/usb-mount
and the script basically takes decisions, and it executes one of this two lines
sudo mount $drive $target
sudo umount $drive
and I have a key binding that executes the command like
sudo /path/to/usb-mount
and well, It runs, it doesn't mount the drive, but if I run the script in the terminal, with sudo
, runs the script and does mount.
Any Idea what I need to do?
Supposedly (to my understanding) If I run sudo
all subsequent actions take sudo
privileges.