From owner-freebsd-questions@FreeBSD.ORG Sun Nov 13 12:32:01 2011 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 38C5510657C3 for ; Sun, 13 Nov 2011 12:31:51 +0000 (UTC) (envelope-from peter@vereshagin.org) Received: from mx1.skyriver.ru (ns1.skyriver.ru [89.108.118.221]) by mx1.freebsd.org (Postfix) with ESMTP id C81958FC0A for ; Sun, 13 Nov 2011 12:31:50 +0000 (UTC) Received: from localhost (exit1.ipredator.se [93.182.132.100]) by mx1.skyriver.ru (Postfix) with ESMTPSA id 77A475AAF for ; Sun, 13 Nov 2011 15:57:07 +0400 (MSK) Date: Sun, 13 Nov 2011 16:31:33 +0400 From: Peter Vereshagin To: freebsd-questions@freebsd.org Message-ID: <20111113102449.GA16065@external.screwed.box> References: <1321152864.63708.YahooMailNeo@web122210.mail.ne1.yahoo.com> <4EBF8CAD.8000003@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4EBF8CAD.8000003@infracaninophile.co.uk> Organization: ' X-Face: 8T>{1owI$Byj]]a; ^G]kRf*dkq>E-3':F>4ODP[#X4s"dr?^b&2G@'3lukno]A1wvJ_L(~u 6>I2ra/<,j1%@C[LN=>p#_}RIV+#:KTszp-X$bQOj,K Subject: Re: How to login to my jail from host itself (normal 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: Sun, 13 Nov 2011 12:32:01 -0000 Hello. 2011/11/13 09:23:57 +0000 Matthew Seaman => To masayoshi : MS> On 13/11/2011 02:54, masayoshi wrote: MS> > I would like to keep her in jail because she is reckless. Wow! MS> Now, if you want to support console based logins direct to a jail. As MS> far as I know, this is not possible with the FreeBSD console. It would MS> be a really cool thing to be able to do though. Dedicate one of the MS> console vty's to the jail... Unfortunately I don't think that's going MS> to be impossible without code changes to the OS. The problem is init(8) MS> -- the master process on the system, and the process that controls each MS> of the getty(8) programs that watch for login attempts on the various MS> terminals -- that program would require modification so that it knew how MS> to associate a particular vty with a jail, and then manage the login MS> process to create a new login session within the jail. I'd find it obvious to try to launch getty by mean of jexec by setting the command in /etc/ttys? Something like that: ttyv0 "/usr/sbin/jexec `cat /var/run/some_jail.id` /usr/libexec/getty Pc" cons25 on secure -- Peter Vereshagin (http://vereshagin.org) pgp: A0E26627