From owner-freebsd-stable@FreeBSD.ORG Sun Oct 10 10:54:53 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 957C5106566B for ; Sun, 10 Oct 2010 10:54:53 +0000 (UTC) (envelope-from iwaki@eng.niigata-u.ac.jp) Received: from mxav02.cc.niigata-u.ac.jp (mxav02.cc.niigata-u.ac.jp [133.35.17.130]) by mx1.freebsd.org (Postfix) with ESMTP id 32F6C8FC08 for ; Sun, 10 Oct 2010 10:54:53 +0000 (UTC) Received: from mxav02.cc.niigata-u.ac.jp (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id DAA214541ED for ; Sun, 10 Oct 2010 19:37:57 +0900 (JST) Received: from ccmail02.cc.niigata-u.ac.jp (ccmail02.cc.niigata-u.ac.jp [133.35.20.10]) by mxav02.cc.niigata-u.ac.jp (Postfix) with ESMTP id D058B4541C2 for ; Sun, 10 Oct 2010 19:37:57 +0900 (JST) Received: from 133.35.85.3 (133.35.85.3 [133.35.85.3]) by ccmail02.cc.niigata-u.ac.jp (deepsmtpd.st 3.5.66) with ESMTP id <4CB1977F.8070205@eng.niigata-u.ac.jp> for ; Sun, 10 Oct 2010 19:37:54 +0900 Message-ID: <4CB1977F.8070205@eng.niigata-u.ac.jp> Date: Sun, 10 Oct 2010 19:37:51 +0900 From: Mamoru Iwaki User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <4CADBF20.1040000@gmail.com> In-Reply-To: <4CADBF20.1040000@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-FROM-DOMAIN: eng.niigata-u.ac.jp X-FROM-EMAIL: iwaki@eng.niigata-u.ac.jp Subject: Re: How dhcp client can set its hostname properly on lease time X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2010 10:54:53 -0000 Hi, Thanks everyone for giving me useful reply. Now, my stupid problem has been solved by setting 'get-lease-hostnames true;' in dhcpd.conf file. Cheers (4:59), Mamoru Iwaki wrote: > Hi, > > I'm using FreeBSD 8 stable as of 20101006. It is a dhcp client in a > private local network, and xorg staff is installed. When I tried to use > it from a remote pc with X11-forwarding set, xauth failed to set up > .Xauthority as follows. > > /usr/local/bin/xauth: creating new authority file /home/hogehoge/.Xauthority > /usr/local/bin/xauth: (stdin):1: bad display name "unix:10.0" in > "remove" command > /usr/local/bin/xauth: (stdin):2: bad display name "unix:10.0" in "add" > command > > At this moment, hostname was not set (it's empty) because the FreeBSD > box was a dhcp client. Meanwhile, if the hostname coresponding to the > ip-address assigned by dhcp server was set manually, the above lines > disappeared and X11-forwarding worked well. > > > Now, my question is > > Are there good way for dhcp client to set its hostname properly on lease > time? > > > The following will be a possble workaround, but I'm wondering there can > be a smart answer in FreeBSD itself. > > It is possible to resolve the hostname corresponding to a dhcp-delivered > ip-address with a local name server. So, (1) resolve the corresponding > hostname from the local name server, (2) set it as hostname, and (3) > call them every time when dhcp lease is updated -- ----- Mamoru IWAKI Grad. Schl. Sci & Tech./Dept. Biocybernetics, Niigata University