[SM-Discuss] chroot over ssh with pam_chroot

Mathieu L. lejatorn at smgl.homelinux.net
Sat Dec 18 19:08:19 EST 2004


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). And this is a problem because the main purpose of this
chroot environment is to allow mail users to change their password on
the server (passwd won't work if the username is unknown!) among a few
 other actions. (cp, mv etc...)

Please note that there is a etc/passwd in the chrooted directory.
Actually, just to test, I even copied everything which was on the
server's /etc into the chrooted directory but I still get the "I have no
name prompt!".
Also, I'm quite sure the problem is related to chroot itself and not to
 the pam module which uses it, because I have this problem even when I
 just chroot locally on the server.

I have no clue on what's going on here; the usual logs don't show
anything relevant and a strace of chroot didn't enlighten me either.
Please let me know if you have any idea.

Cheers,
Mathieu.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/sm-discuss/attachments/20041219/30299478/attachment.bin 


More information about the SM-Discuss mailing list