0

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...

1
  • Agreed, this is a duplicate of that question - can someone mark it as such? Jun 5, 2013 at 14:31

1 Answer 1

1

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

1
  • 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? Jun 5, 2013 at 13:01

Not the answer you're looking for? Browse other questions tagged .