Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: Can't run whoami(id -un) inside chroot jail using openssh native jai

Subject: Re: Can't run whoami(id -un) inside chroot jail using openssh native jail support
Date: Thu, 24 Jul 2008 22:41:04 +0300
2008/7/23, D M <dm.mlist@gmail.com>:

OS: RHEL5.2
 Openssh: 5.0p1 and now 5.1

 I have successfully setup a chroot jail using openssh's new native
 jail support and almost everything appears to be working
 (ls,cd,cat,uname,etc,ect). However I can't run any commands that
 identify the user.. such as ld -un whoami logname. They all fail with
 this result:

 #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

 i've made sure that /etc/passwd and even /etc/group are in the jail
 with the proper permissions but still I get the same result.. Any
 suggestions??

I wonder if you are missing NSS (/etc/nsswitch.conf) in your jailed
system? I would also check it with strace, like:

strace id -un

Although that would probably require setting up strace which might be
too expensive to set up in a jailed system.

Cheers,

VL

Regards,

VL

<Prev in Thread] Current Thread [Next in Thread>