I'm working on a rhel5.1 server with OpenSSH version 4.9-5.x installed which has support for jails natively. Now I have the jail working great except I cannot get the commands:
whoami - aka id -un
logname
to work properly inside the jail.. anyone else have this problem? Here is what I have setup in my sshd_conf
Match User jailuser
ChrootDirectory /chroot/jail/
AllowTcpForwarding no
Now i've used nixCraft's nice little script to help me move over library's (
http://www.cyberciti.biz/files/lighttpd/l2chroot.txt) and everything else seems to be working fine. Here are a few examples of output I get
#whoami
whoami: cannot find name for user ID 503
#id
uid=503 gid=504 groups=504
#id -un
id: cannot find name for user ID 503
503
#logname
503
So its getting the uid.. but I guess it can't lookup the name...