From owner-freebsd-security Sat Feb 10 16:52:54 1996 Return-Path: owner-security Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA25626 for security-outgoing; Sat, 10 Feb 1996 16:52:54 -0800 (PST) Received: from ibp.ibp.fr (ibp.ibp.fr [132.227.60.30]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id QAA25605 for ; Sat, 10 Feb 1996 16:52:46 -0800 (PST) Received: from blaise.ibp.fr (blaise.ibp.fr [132.227.60.1]) by ibp.ibp.fr (8.6.12/jtpda-5.0) with ESMTP id BAA23465 ; Sun, 11 Feb 1996 01:52:44 +0100 Received: from (uucp@localhost) by blaise.ibp.fr (8.6.12/jtpda-5.0) with UUCP id BAA11141 ; Sun, 11 Feb 1996 01:52:45 +0100 Received: (from roberto@localhost) by keltia.freenix.fr (8.7.3/keltia-uucp-2.7) id BAA03804; Sun, 11 Feb 1996 01:36:29 +0100 (MET) From: Ollivier Robert Message-Id: <199602110036.BAA03804@keltia.freenix.fr> Subject: Re: Need help building jails To: yankee@anna.az.com (az.com) Date: Sun, 11 Feb 1996 01:36:29 +0100 (MET) Cc: freebsd-security@FreeBSD.ORG In-Reply-To: from "az.com" at "Feb 10, 96 09:49:10 am" X-Operating-System: FreeBSD 2.2-CURRENT ctm#1630 X-Mailer: ELM [version 2.4ME+ PL5 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-security@FreeBSD.ORG Precedence: bulk It seems that az.com said: > Want to do a chroot immediately upon login for certain accounts and make > twilight zone versions of > /usr/home,/usr/bin,/usr/sbin,/bin,/sbin,/usr/local/bin in a directory > called /usr/jail Here is the shell I used in the past for my "guest" account here : #! /usr/bin/suidperl # chroot "/users/guest"; $< = $> = 1000; $ENV{TERM} = 'vt100'; $ENV{PATH} = '/bin:/usr/bin'; $ENV{SHELL} = '/bin/tcsh'; $ENV{HOME} = '/guest'; chdir "/guest"; print < 2. Can I find code for FreeBSD to do exactly the same thing as chroot with > ftpd? Use the wu-ftpd 2.4, put the users in a special group called for example "ftponly" and use the following in ftpaccess: guestgroup ftponly > 3. Can I find code for FreeBSD to do exactly the same thing as chroot > with httpd? Most servers can do it automatically or you may find patches for them to do a chroot. Apache can do it I think. -- Ollivier ROBERT -=- The daemon is FREE! -=- roberto@keltia.frmug.fr.net FreeBSD keltia.freenix.fr 2.2-CURRENT #5: Sun Feb 4 03:11:17 MET 1996