UbuntuHelp:UbuntuLTSP/LocalAppsResolvConf
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
This page is specific to Ubuntu versions 9.04 |
If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.
Repairing permissions for /etc/resolv.conf file in chroot
There is a bug that affects name resolution from within the client chroot. This affects applications that are run locally on the thin client. The resolver configuration file /etc/resolv.conf is not created properly due to broken permissions. Bug: https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/347957 Here is a workaround for that bug that applies for both setup types - one or two network interfaces on the server. 1. Create a script that will set up the proper permissions
$ cat /opt/ltsp/i386/etc/init.d/chmod-resolv.sh #! /bin/sh chmod 644 /etc/resolv.conf
2. Add three lines to the lts.conf file
$ cat /var/lib/tftpboot/ltsp/i386/lts.conf SEARCH_DOMAIN = ubuntu-ltsp5 || Change this for your own network DNS_SERVER = 192.168.1.1 || Change this for your own network RCFILE_01=/etc/init.d/chmod-resolv.sh
3. Rebuild the client image
$ sudo ltsp-update-image
4. Boot a thin client, connect to its shell (ex: via SSH or from the unlocked root account), and verify that the mode and content are correct
# ls -al /etc/resolv.conf -rw-r--r-- 1 root root 43 2002-01-13 17:13 /etc/resolv.conf # cat /etc/resolv.conf search ubuntu-ltsp5 nameserver 192.168.1.1