as follows:
Code: Select all
me ALL = NOPASSWD: /bin/mount
I have a script in /home/me/bin. If I open a terminal and invoke this, the script is recognised and executed with no password being necessary. This is the script - very simple.
Code: Select all
#!/bin/bash
# mountnas
if [ 0 = `sudo mount |grep -c nasbox` ]
then
sudo mount -a
fi
(this is in Mint13Mate 64bit)