Somehow when an user (made by ispconfig in chrooted jail) logs in he can't resolve any hostnames, using the wget (or svn) commands he just gets "Resolving {ADDRESS}... failed: Name or service not known. wget: unable to resolve host address" this only seems to occur with chrooted users, normal users can just do everything. I've probably missed something, I just can't seem to find out what Thanks in advance,
I'm guessing the jailrooted user is missing the file /etc/resolv.conf ? Try copying that file to the users' jailroot and see if it resolves the problem. I've tested this on the svn version and seems to work just fine.
The user is getting the resolv.etc file, can open it and it contains the right data. Should have put that in my first post
Hadn't tried the host command yet, this works (nslookup and dig are not in my chroot) Heres the output of host, ping and wget: Code: test@{MYSERVER}:/tmp$ host www.google.com www.google.com is an alias for www.l.google.com. www.l.google.com has address 74.125.77.104 www.l.google.com has address 74.125.77.147 www.l.google.com has address 74.125.77.99 test@{MYSERVER}:/tmp$ ping www.google.com ping: unknown host www.google.com test@{MYSERVER}:/tmp$ wget www.google.com --2011-08-25 08:03:34-- http://www.google.com/ Resolving www.google.com... failed: Name or service not known. wget: unable to resolve host address `www.google.com' somehow the host command works fine even though the ping and wget fail
Try setting the nameservers to the ones of opendns and try again: nameserver 208.67.222.222 nameserver 208.67.220.220 replace these with the one in your /etc/resolv.conf
Tried that and doesn't help (I was already using the google DNS servers anyway). I'm thinking it has to do with certain files not being copied.
Nobody else that has an idea where I should look for this problem? I would like to continue working on testing ISPconfig
Can you try this? http://osdir.com/ml/apache.mod-security.user/2004-07/msg00008.html http://forum.nginx.org/read.php?3,212362 You probably need to add the libnss_files and libnss_dns libraries to the chroot environment.
Falko, when looking at the 2nd problem I test it using an php script and it works fine (no dns problem) and the output is: Code: Array ( [0] => Array ( [host] => www.howtoforge.com [type] => A [ip] => 188.40.16.205 [class] => IN [ttl] => 180 ) ) Which looks fine to me, would it still be usefull to add those files (from the first link) to my chrooted jail?
But it works from a PHP script inside the chroot? Please check if all needed libraries for a tool are inside your chroot. You can find out about the required libraries for a program as follows: Code: ldd /usr/bin/wget | awk '{ print $3 }' Do you have /lib/libnss_compat.so.2, /lib/libnsl.so.1, and /lib/libnss_files.so.2 in the lib directory in your chroot?