sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: Mads Laursen <smgl AT dossen.dk>
- To: sm-discuss AT lists.ibiblio.org
- Subject: Re: [SM-Discuss] chroot over ssh with pam_chroot
- Date: Mon, 20 Dec 2004 00:51:18 +0100
On 19/12/04 01.08, Mathieu L. wrote:
> Hi all,
>
> I am currently trying to set up a chrooted environment for ssh
> connections on my server. To achieve that I use the pam module
> pam_chroot (a spell for it is in test) since my sshd uses pam.
>
> It seems to work except that I get a "I have no name!" prompt because
> the chroot doesn't manage to know what's the username (though echo $USER
> returns fine).
It's been awfully long since I did any serious chrooting, but I seem
to recall that the "I have no name!" issue is related to the libraries
available in the current view of the filesystem.
Could you try to chroot and run 'find /'? What's in /lib and /usr?
Try to unpack the compile-cache files for a really barebones system
(glibc, bash, that sort of thing) into the chroot. Does that fix it?
Try to run 'ldd `type -p passwd`' and anything else relevant in the
chroot. On my box it gives:
linux-gate.so.1 => (0xffffe000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40029000)
libc.so.6 => /lib/libc.so.6 (0x40055000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
so those libs need to be in the chroot to run passwd (unless you build
a static passwd into the chroot (might not be a bad idea if it is only
for very specific purposes)).
Hope this helps.
/dossen
Attachment:
pgpCTHLfnpc4A.pgp
Description: PGP signature
-
[SM-Discuss] chroot over ssh with pam_chroot,
Mathieu L., 12/18/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mads Laursen, 12/19/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mathieu L., 12/19/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mads Laursen, 12/20/2004
- Re: [SM-Discuss] chroot over ssh with pam_chroot, Mathieu L., 12/20/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mathieu L., 12/21/2004
- Re: [SM-Discuss] chroot over ssh with pam_chroot, Seth Alan Woolley, 12/21/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mads Laursen, 12/20/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mathieu L., 12/19/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Seth Alan Woolley, 12/19/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mathieu L., 12/19/2004
- Re: [SM-Discuss] chroot over ssh with pam_chroot, Seth Alan Woolley, 12/20/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mathieu L., 12/19/2004
- Re: [SM-Discuss] chroot over ssh with pam_chroot, Karsten Behrmann, 12/20/2004
-
Re: [SM-Discuss] chroot over ssh with pam_chroot,
Mads Laursen, 12/19/2004
Archive powered by MHonArc 2.6.24.