1

In Xubuntu 12.10, I can mount external disks that are attached and they appear under /media/$username/$diskname. I can unmount them by going to the desktop, right-clicking, waiting 6 seconds or so, and clicking Eject Volume - or by opening gnome-disks and clicking on stop on the disk icon.

However, I'd far prefer to simply run umount /media/$username/$diskname from the command-line. This currently requires sudo rights, or for me to add each disk to the fstab - since the whole point of this is automatically mounting previously-unseen disks, that won't work generally.

How can I configure the rights/etc to be able to umount automatically mounted disks? I am the right user after all...

David Fraser
  • 1,717

1 Answers1

2

The quickest way is to add your user in /etc/group under the group sudo which will give you the proper right to run sudo umount /media/$username/$diskname

If you don't want to enter your password, you can define a special rule with visudo:
$username ALL = NOPASSWD: /bin/umount

Cyril Laury
  • 956
  • 6
  • 6
  • Thanks - I know how to do that, and I'm actually happy to let my user unmount anything. But it still seems it would be more logical to allow the user to unmount these items as they can do from the UI. What gives the gnome-disks application the right to do this without sudo rights for these particular mounts? – David Fraser Jun 05 '13 at 13:01