Re: Passwords in Jails

From: Uwe Doering (gemini@geminix.org)
Date: 02/06/03


Date: Thu, 06 Feb 2003 11:42:12 +0100
From: Uwe Doering <gemini@geminix.org>
To: freebsd-security@FreeBSD.ORG

Mike Tancsa wrote:
> At 08:43 AM 2/5/2003 +0100, Alex Huth wrote:
>
>> Where can I solve this problem or is there a possibility to manage
>> passwords/public keys of a jail from the basesystem?
>
> Yes, just manipulate the master.passwd file directly from outside your
> jail, or cp your public key to the appropriate authorized_keys2 file, as
> you have access to the entire file system from the base system.

You may want to make sure, though, that the Jail is not running before
you do so. Writing to a Jail from the outside is a major security
headache if it is inhabited by untrusted users. Imagine what happens
when the user does this (or similar things) in his '/etc':

     ln -sf /etc/master.passwd master.passwd

You'd end up changing the respective file in your base system. Stopping
the Jail prevents races, so you can inspect files in a safe manner
before you actually change them. Chrooting into the Jail and changing
files from there might help as well:

     chroot /path/to/jail/root

   Uwe

-- 
Uwe Doering <gemini@geminix.org>
Berlin, Germany
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message


Relevant Pages

  • Re: Passwords in Jails
    ... Alex Huth wrote: ... >passwords/public keys of a jail from the basesystem? ... jail, or cp your public key to the appropriate authorized_keys2 file, as ... you have access to the entire file system from the base system. ...
    (FreeBSD-Security)
  • order of IP addresses on an interface? (5.3)
    ... I have a piece of software licensed to the base system IP since the ... jail on that licensed server. ... license now picks up the jail IP, ... ifconfig_bge0_alias0="inet xxx.70.252.50 netmask 255.255.255.255" ...
    (freebsd-questions)
  • running pipe/wu-imap in jail
    ... I'm going to setup a jailed environment on FreeBSD 4.8-RELEASE. ... In a jail I have running ssh, syslogd, ... All these daemons also works on the base system correctly. ... Only thing is going wrong is pine and wu-imap. ...
    (freebsd-questions)
  • Re: Idea about "skeleton jail"
    ... > useful to start the jail. ... > to need about 110MB and with skeljail you will only need no more than ... > - Run ports that does touch system area. ... usage and synchonize automatically jails with base system. ...
    (freebsd-hackers)
  • Re: vpn client (pptp) inside a jail
    ... Does anyone know a solution for assigning a jail to a trusted network ... I can use my pptp address from within a jail, of course the tunnel is ... up and visible to the base system. ...
    (freebsd-questions)