I've modified the sudoers file so that a sudo password is required for all except mount and umount for an automated script:
# User privilege specification root ALL=(ALL) ALL pi ALL=(ALL) ALL pi ALL=(ALL) NOPASSWD:/bin/mount, /bin/umount
Have i done this correctly?
The problem i now have is that when logging in via SSH i am prompted to enter my sudo password:
$ ssh email@example.com The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. [sudo] password for pi:
Changing the sudoers line to:
# User privilege specification root ALL=(ALL) ALL pi ALL=(ALL) NOPASSWD: ALL
means that i can login without needing to enter sudo password.