Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jul 2008 16:21:17 +0200
From:      Anders Troback <freebsd@troback.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: (un)mounting usb disk as non root user
Message-ID:  <20080709162117.12611299@itpc02.gelita.swe>
In-Reply-To: <17233.217.114.136.134.1215602962.squirrel@mail.dsa.es>
References:  <17233.217.114.136.134.1215602962.squirrel@mail.dsa.es>

index | next in thread | previous in thread | raw e-mail

On Wed, 9 Jul 2008 11:29:22 -0000 (GMT)
"DSA - JCR" <juancr@dsa.es> wrote:

> Hi all
> 
> FreeBSD 6.2
> 
> I have made a copy system with USB disk and GELI for crypto.
> 
> Now, I would like that one non root user can login run a shell form
> unmount the disk and change it, and then mount the new usb disk.
> 
> I have the shell script done, but only works if it runs under root.
> When I tried to run under the user, I get
> 
> unmount /mnt/usb1  - Operation not permited
> 
> My user is in the group operator, but what more can I do?
> 
> I want to let them a script that in the login moment they can safely
> change the usb disks.
> 
> 
> Thanks in advance
> 
> Juan Coruņa
> Desarrollo de Software Atlantico
> 
> 
> 

Add the following line to your /etc/sysctl.conf file:

    vfs.usermount=1

To enable it immediately run the following command as root:

    sysctl vfs.usermount=1

The user must be the owner of the mount point!

-- 
Anders Trobäck
http://www.troback.com/
============================================
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
--------------------------------------------


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080709162117.12611299>