[Nix-dev] Re: Allowing users to mount usb-storages.

Eelco Dolstra e.dolstra at tudelft.nl
Mon Jan 12 18:09:42 CET 2009


Ludovic Courtès wrote:

> "Lluís Batlle" <viriketo at gmail.com>
> writes:
> 
>> I wonder, how do you configure your systems, to allow non-root users
>> mounting usb-storages.
> 
> I actually have a couple of lines like "sudo mount -t vfat ..." in my
> Bash history, which is arguably suboptimal.  ;-)
> 
>> I've always done that adding entries to /etc/fstab with 'user' option,
>> for fixed /dev/sdb1, /dev/sdc1, ..., pointing to /mt/usbb, /mnt/usbc,
>> ...
>>
>> Some distros have udev rules for that, creating content on /mnt and
>> fstab entries.
> 
> I'm not knowledgeable in that area, but I agree that something automagic
> would be really nice.

I've been wanting to add support for this for a while.  We probably need to add
PolicyKit, pmount and maybe some other stuff.  The main problem is that you want
to mount the device under the UID of the user who is currently logged in, which
is what PolicyKit does IIRC.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list