I am trying to get my ipod to automatically unmount. The only way I can remove the do not disconnect sign from the ipod display is to run: sudo eject /media/ipod
What I want to do is automate this process with gtkpod so it unmounts properly when I exit the program. Gtkpod supports scripts on exit that I can write easily enough. However I need to find a way to use sudo eject without a password.
Here is my /etc/sudoers file. I have tried to set it so that I (user ben) can use the sudo eject command without a password. I have read the man pages but I can't seem to get it right and the nopasswd seems to have no effect. What am I doing wrong?
Code:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults
Defaults !lecture,tty_tickets,!fqdn
# User privilege specification
root ALL=(ALL) ALL
ben ALL= NOPASSWD : /usr/bin/eject/
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
I am using kubuntu 5.10 if that makes any difference to anybody.