Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

marked as duplicate by Takkat, Mitch, Jorge Castro, belacq, Uri Herrera Jun 5 '13 at 23:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Agreed, this is a duplicate of that question - can someone mark it as such? –  David Fraser Jun 5 '13 at 14:31

1 Answer 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

share|improve this answer
    
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 5 '13 at 13:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.