Empty and not readable /etc/resolv.conf file

Asmo Koskinen asmo.koskinen at arkki.info
Mon Apr 6 16:03:41 BST 2009


Asmo Koskinen kirjoitti:

> 1. I have lts.conf
> 
> admin-ltsp5 at ubuntu-ltsp5:~$ cat /var/lib/tftpboot/ltsp/i386/lts.conf
> [default]
> SEARCH_DOMAIN=ubuntu-ltsp5
> DNS_SERVER=192.168.1.1
> admin-ltsp5 at ubuntu-ltsp5:~$

This works now very good.

> b. Full and unreadable
> 
> ---------- 1 root root 43 2002-01-08 23:22 /etc/resolv.conf
> 
> c. Full and readable
> 
> -rwxr-xr-x 1 root root 43 2002-01-08 23:22 /etc/resolv.conf

If I boot thin client, I am in situation b.

admin-ltsp5 at ubuntu-ltsp5:~$ sudo sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
admin-ltsp5 at ubuntu-ltsp5:~$ sudo iptables --table nat --append 
POSTROUTING --jump MASQUERADE --source 192.168.0.0/24

admin-ltsp5 at ubuntu-ltsp5:~$ ssh root at 192.168.0.200
root at 192.168.0.200's password:

root at ltsp200:~# ls -al /etc/resolv.conf
---------- 1 root root 43 2002-01-08 23:47 /etc/resolv.conf

root at ltsp200:~# cat /etc/resolv.conf
search ubuntu-ltsp5
nameserver 192.168.1.1

root at ltsp200:~# ping ftp.funet.fi
PING ftp.funet.fi (193.166.3.2) 56(84) bytes of data.
64 bytes from ftp.funet.fi (193.166.3.2): icmp_seq=1 ttl=241 time=24.0 ms

And I have to touch that file and then again Konqueror can use names.

root at ltsp200:~# chmod 644 /etc/resolv.conf
root at ltsp200:~# ls -al /etc/resolv.conf
-rw-r--r-- 1 root root 43 2002-01-08 23:47 /etc/resolv.conf
root at ltsp200:~#
----

There must something in some script that should change that mode in chroot?

Best Regards Asmo Koskinen.



More information about the edubuntu-users mailing list