Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There's a plenty of advices across the Internet on how to enable DNS in chroot.

The problem is that there's no /lib/libnss* files in the Ubuntu Precise.

I've tried to copy these files from /etc/: hosts, nsswitch.conf, resolv.conf and the entire /lib directory. But DNS is still not working.

Does anyone have a recipe for the recent Ubuntu?

share|improve this question

2 Answers 2

well... there are two solutions: the first, and most simple one, is to look for the library into /lib64 if present, or eventually using locate libnss to look for it.
The other solution would be to use strace to see where is the system looking for the library and look in the main system for those libraries. :)

share|improve this answer

As a start, this script, once customized, should give you a basis for a chroot.

http://www.fuschlberger.net/programs/ssh-scp-sftp-chroot-jail/make_chroot_jail.sh

Just as a caveat for other readers, just read this

PHP-FPM chroot with chdir

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.