个人工具

UbuntuHelp:UbuntuLTSP/LocalAppsResolvConf

来自Ubuntu中文

Wikibot讨论 | 贡献2009年5月18日 (一) 18:01的版本 (创建新页面为 '{{From|https://help.ubuntu.com/community/UbuntuLTSP/LocalAppsResolvConf}} {{Languages|UbuntuHelp:UbuntuLTSP/LocalAppsResolvConf}} {|border="1" cellspacing="0" |This page is spec...')

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索
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