From owner-freebsd-questions Fri Mar 24 5:39:34 2000 Delivered-To: freebsd-questions@freebsd.org Received: from europe.std.com (europe.std.com [199.172.62.20]) by hub.freebsd.org (Postfix) with ESMTP id 9DACB37B62D for ; Fri, 24 Mar 2000 05:39:31 -0800 (PST) (envelope-from lowell@world.std.com) Received: from world.std.com (lowell@world-f.std.com [199.172.62.5]) by europe.std.com (8.9.3/8.9.3) with ESMTP id IAA01549 for ; Fri, 24 Mar 2000 08:39:30 -0500 (EST) Received: (from lowell@localhost) by world.std.com (8.9.3/8.9.3) id IAA15712; Fri, 24 Mar 2000 08:39:29 -0500 (EST) To: freebsd-questions@freebsd.org Subject: Re: mounting floppies and cd's References: <38D9F4A1.997811ED@bluewin.ch> <20000324080203.F59219@draenor.org> From: Lowell Gilbert Date: 24 Mar 2000 08:39:29 -0500 In-Reply-To: Marc Silver's message of Fri, 24 Mar 2000 08:02:03 +0200 Message-ID: Lines: 29 X-Mailer: Gnus v5.5/Emacs 20.2 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Marc Silver writes: > As far as I know there isn't something like this in FreeBSD. Well, there's the vfs.usermount sysctl, which allows regular users to mount devices onto the filesystem tree. It's a little different in that it can't be set for some filesystems and not others, but it does address most of the same security concerns. It's still something you'd want to keep away from users who are actually malicious, though. > What you're doing there is setting the binary as setuid which allows > people to execute it as root, and allows them to mount/unmount the CD. That suid program looks okay, but you would want the nosuid and nodev options on that filesystem in your fstab. I'd recommend rdonly as well, and noexec might even be a good idea. A carefully configured sudo setting should be even safer. It's important to remember that mounting filesystems really is a security concern, and there are good reasons for requiring the root password or equivalent in order to change them. Applying the suid program as posted, without the nosuid and nodev options, is essentially giving root powers to anyone on the system who wants to get them. Accordingly, it's only appropriate in situations (like personal workstations) where everyone who can log in to the machine really is trusted with the root password. Even then, it's unnecessarily risky, particularly if the machine is connected to the Internet. Be well. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message