Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Nov 2011 16:31:33 +0400
From:      Peter Vereshagin <peter@vereshagin.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to login to my jail from host itself (normal user)
Message-ID:  <20111113102449.GA16065@external.screwed.box>
In-Reply-To: <4EBF8CAD.8000003@infracaninophile.co.uk>
References:  <1321152864.63708.YahooMailNeo@web122210.mail.ne1.yahoo.com> <4EBF8CAD.8000003@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello.

2011/11/13 09:23:57 +0000 Matthew Seaman <m.seaman@infracaninophile.co.uk> => 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 <peter@vereshagin.org> (http://vereshagin.org) pgp: A0E26627 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111113102449.GA16065>