From owner-freebsd-questions@FreeBSD.ORG Wed Jul 9 14:20:05 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67E0D106567E for ; Wed, 9 Jul 2008 14:20:05 +0000 (UTC) (envelope-from freebsd@troback.com) Received: from mail.gelita.se (212-162-182-244.skbbip.com [212.162.182.244]) by mx1.freebsd.org (Postfix) with ESMTP id 250148FC12 for ; Wed, 9 Jul 2008 14:20:04 +0000 (UTC) (envelope-from freebsd@troback.com) Received: from itpc02.gelita.swe (212-162-182-242.skbbip.com [212.162.182.242]) by mail.gelita.se (Postfix) with ESMTP id 9DD8210FC37 for ; Wed, 9 Jul 2008 16:19:52 +0200 (CEST) Date: Wed, 9 Jul 2008 16:21:17 +0200 From: Anders Troback To: freebsd-questions@freebsd.org 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> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable MailScanner-NULL-Check: 1216217992.75357@7VN+vbZg2L9MBcOtcvy9BQ X-Troback-MailScanner-Information: Please contact postmaster@troback.com for more information X-Troback-MailScanner: Found to be clean X-Troback-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 3.2, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-Troback-MailScanner-From: freebsd@troback.com X-Spam-Status: No Subject: Re: (un)mounting usb disk as non root user X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2008 14:20:05 -0000 On Wed, 9 Jul 2008 11:29:22 -0000 (GMT) "DSA - JCR" wrote: > Hi all >=20 > FreeBSD 6.2 >=20 > I have made a copy system with USB disk and GELI for crypto. >=20 > 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. >=20 > I have the shell script done, but only works if it runs under root. > When I tried to run under the user, I get >=20 > unmount /mnt/usb1 - Operation not permited >=20 > My user is in the group operator, but what more can I do? >=20 > I want to let them a script that in the login moment they can safely > change the usb disks. >=20 >=20 > Thanks in advance >=20 > Juan Coru=F1a > Desarrollo de Software Atlantico >=20 >=20 >=20 Add the following line to your /etc/sysctl.conf file: vfs.usermount=3D1 To enable it immediately run the following command as root: sysctl vfs.usermount=3D1 The user must be the owner of the mount point! --=20 Anders Trob=E4ck http://www.troback.com/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?" --------------------------------------------