From owner-freebsd-questions@FreeBSD.ORG Fri Sep 24 15:51:04 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6577416A4DD; Fri, 24 Sep 2004 15:51:03 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25ACC43D45; Fri, 24 Sep 2004 15:51:03 +0000 (GMT) (envelope-from David.Bear@asu.edu) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0I4J00B01YJ83I@asu.edu>; Fri, 24 Sep 2004 08:47:32 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) <0I4J00AJ6YJ45Y@asu.edu>; Fri, 24 Sep 2004 08:47:32 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.69.200]) (8.12.10/8.12.10/asu_smtp_relay,nullclient,tcp_wrapped) with ESMTP id i8OFlN71013368; Fri, 24 Sep 2004 08:47:23 -0700 (MST) Received: by moroni.pp.asu.edu (Postfix, from userid 500) id 4A658EEA; Fri, 24 Sep 2004 08:46:54 -0700 (MST) Received: from post1.inre.asu.edu (post1.inre.asu.edu [129.219.110.72]) by imap1.asu.edu (8.11.0/8.11.0/asu_cyrus,tcp_wrapped) with ESMTP id g6J2uYE13028 for ; Thu, 18 Jul 2002 19:56:34 -0700 (MST) Received: from conversion.post1.inre.asu.edu by asu.edu (PMDF V6.1 #40110) david.bear@asu.edu) ; Thu, 18 Jul 2002 19:56:35 -0700 (MST) Received: from mx2.freebsd.org (mx2.FreeBSD.org [216.136.204.119]) by asu.edu (PMDF V6.1 #40110) with ESMTP id <0GZH000IW6UB1T@asu.edu> for iddwb@IMAP1.ASU.EDU (ORCPT david.bear@asu.edu); Thu, 18 Jul 2002 19:56:35 -0700 (MST) Received: from hub.freebsd.org (hub.FreeBSD.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id BE2DB5593B; Thu, 18 Jul 2002 19:56:20 -0700 Received: by hub.freebsd.org (Postfix, from userid 538) id 0AC9737B405; Thu, 18 Jul 2002 19:56:15 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id 657802E8022; Thu, 18 Jul 2002 19:56:13 -0700 (PDT) Received: by hub.freebsd.org (bulk_mailer v1.12); Thu, 18 Jul 2002 19:56:13 -0700 Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A910937B400; Thu, 18 Jul 2002 19:56:09 -0700 (PDT) Received: from ns2.austclear.com.au (ns2.austclear.com.au [192.43.185.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B5C143E58; Thu, 18 Jul 2002 19:56:08 -0700 (PDT envelope-from ahl@austclear.com.au) Received: from tungsten.austclear.com.au (tungsten.austclear.com.au [192.168.166.65]) by ns2.austclear.com.au (8.11.2/8.11.3) with ESMTP id g6J2u7t11018; Fri, 19 Jul 2002 12:56:07 +1000 (EST envelope-from ahl@austclear.com.au) Received: from tungsten (tungsten [192.168.166.65]) by tungsten.austclear.com.au (8.9.3/8.9.3) with ESMTP id MAA00937; Fri, 19 Jul 2002 12:56:06 +1000 (EST) From: Tony Landells In-reply-to: Message from Michael Sharp "of Thu, 18 Jul 2002 22:22:59 -0400." <1085.192.168.1.4.1027045379.squirrel@webmail.probsd.ws> Sender: owner-freebsd-security@FreeBSD.ORG To: dwbear75@gmail.com Message-id: <200207190256.MAA00937@tungsten.austclear.com.au> MIME-version: 1.0 X-Mailer: exmh version 2.1.1 10/15/1999 Content-type: text/plain; charset=us-ascii Precedence: bulk X-Loop: FreeBSD.org Delivered-to: freebsd-security@freebsd.org Old-To: Michael Sharp Lines: 46 X-Keywords: cc: freebsd-security@FreeBSD.ORG cc: freebsd-questions@FreeBSD.ORG Subject: Re: chroot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Fri, 24 Sep 2004 15:51:04 -0000 X-Original-Date: Fri, 19 Jul 2002 12:56:05 +1000 X-List-Received-Date: Fri, 24 Sep 2004 15:51:04 -0000 How very interesting... For a start, you can't copy devices with "cp"--you need something smarter like "tar", "cpio", ... Pretty much anything that could be used for backups should understand the niceties of copying a device. As an alternative you could use "mknod" to create them. Here is how to do it with cpio: cd /dev find null random urandom -print | cpio -pdmuv /home/chrootuser/dev/ and then compare the results with ls -l to make sure you're happy. Specifically, using "cp" to copy /dev/null is a method of creating a new empty file, or completely emptying out an existing file. Secondly, are you sure you weren't connected? If you could use control-d to terminate the connection it looks to me like you were connected but had no prompt. Control-d is an "end of file" indicator; when you give it to a shell that means "there are no more commands". Since the sole purpose of a shell is to let you execute commands, this results in it terminating (as it does for any program that primarily processes input). However "end of file" is only meaningful if it's read by something. It doesn't generate any sort of "signal" to catch the attention of a hung program. Try connecting again and typing a command that should work, like "/bin/ls /bin" or even something more basic like "set" (which is builtin to all the shells). If you get something, you're connected. Tony -- Tony Landells Senior Network Engineer Ph: +61 3 9677 9319 Australian Clearing Services Pty Ltd Fax: +61 3 9677 9355 Level 4, Rialto North Tower 525 Collins Street Melbourne VIC 3000 Australia To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message