From owner-freebsd-questions@FreeBSD.ORG Wed May 2 00:22:39 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3405116A408 for ; Wed, 2 May 2007 00:22:39 +0000 (UTC) (envelope-from xrayv19@yahoo.com) Received: from web58113.mail.re3.yahoo.com (web58113.mail.re3.yahoo.com [68.142.236.136]) by mx1.freebsd.org (Postfix) with SMTP id D4E2913C457 for ; Wed, 2 May 2007 00:22:38 +0000 (UTC) (envelope-from xrayv19@yahoo.com) Received: (qmail 30889 invoked by uid 60001); 2 May 2007 00:22:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=6AppgG+TfdNahxWhcGJ5cixmip//tFsSBVmvFEuHl/k7c76FM8q04cN8k53l4DyoPndnm5RdDWKLlXknDGQelSfja8VLDX1tDVR6eX6lxZbQ/WXJz1mM+JI2oxSHO/E7jaJtlxpVXJ1QlciNQPZUu6F8l/yHgE3aCrscdGLldHg=; X-YMail-OSG: S5YMd6sVM1ly8oozh9BRhHfN4wQR4xTwnAs.Ty.4EGC7cGn62v0khm17Vzg4VPv_37PRtkFGApqjhYK5tPdWth1QtT6LPRCmQMN1 Received: from [131.191.24.2] by web58113.mail.re3.yahoo.com via HTTP; Tue, 01 May 2007 17:22:38 PDT Date: Tue, 1 May 2007 17:22:38 -0700 (PDT) From: L Goodwin To: beech@alaskaparadise.com In-Reply-To: <200704280934.54852.beech@alaskaparadise.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <155677.28326.qm@web58113.mail.re3.yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: DHCP client configuration on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2007 00:22:39 -0000 --- Beech Rintoul wrote: > On Saturday 28 April 2007, L Goodwin said: > > --- Beech Rintoul > wrote: > > > On Friday 27 April 2007, L Goodwin said: > > > > When I ran the DHCP client configuration tool > on > > > > FreeBSD 6.2, it added a new hostname variable > to > > > > /etc/rc.conf below existing the hostname var > (it > > > > did not remove or comment-out the old hostname > > > > variable). > > > > The NEW hostname includes the ISP's domain > name: > > > > hostname="dhcppc0." > > > > > > > > This hostname differs from the hostname listed > in > > > > the router's DHCP table "dhcpp0" (no domain > name). > > > > It also shows unique IP addresses and MAC > > > > addresses > > > > > > for all hosts on the LAN. > > > > > > > > I can ping the IP address assigned to the > FreeBSD > > > > system, but ping and net lookup fail when its > > > > hostname is specified (both with and without > the > > > > domain name). > > > > > > > > Questions: > > > > 1) Why did the hostname get changed (does not > > > > occur for Windows clients)? > > > > 2) Why does the hostname in /etc/rc.conf > contain > > > > the DNS domain name? > > > > > > FreeBSD uses the FQDN (fully qualified domain > name) > > > as the hostname. > > > Example: hostname= "yourmachine.yourdomain.com" > > > > > > > 3) How do I resolve this problem? > > > > > > Unless you provide your own DNS that resolves > your > > > internal network and supersede dhclient with > your > > > domain name, DHCP will use the domain and DNS > from > > > your provider. Your windows boxes point to your > > > isp's nameservers which have no records of your > > > server or it's address. Therefore it can't > resolve > > > your machine's hostname. > > > If you do provide your own internal name service > you > > > will also need to edit /etc/dhclient.config (see > man > > > dhclient.conf), and point your windows boxes to > your > > > DNS instead of your isp's. You can use a > fictitious > > > domain name internally, just make sure that the > > > domain doesn't actually exist on the net. > > > You can also use the FreeBSD IP address as a > domain > > > name on your windows boxes to connect. > > > > Is there a way to a) make dhclient use hostname > > without a domain name appended, or b) make > dhclient > > instruct the DHCP server to append the domain name > to > > the hostname? > > You're confusing windows networking with "real" > networking. If all > you're trying to do is share files with the windows > boxes, just put > the machine name as hostname and don't worry what > gets appended to > it. Samba will handle the windows part of it > (machine name and > workgroup). Windows uses a different system to > identify machines on > it's network. Don't confuse a windows "domain" with > a real domain > they are different things. On a windows network you > use samba to make > the windows boxes "think" that the FreeBSD box is > one of theirs and > share files and printers. You can find detailed > how-to's on samba's > site. There is no need to ping by hostname unless > you're running a > server on the FreeBSD box in which case you need to > setup real DNS or > just use the FreeBSD IP as the hostname from > windows. > > > > > > Running bind requires a fairly steep learning > > > curve, but there are simple nameservers in the > ports > > > tree that would probably better suit your needs. > > > > Are you referring to the built-in command in bsh > that > > lists/alters key bindings for the line editor? > > I don't understand what bind has to do with any of > this. > > I'm not talking about binding keys, what I was > talking about is bind. > That's a dns server already in the base system. If > you want to freely resolve your machines by hostname > and domain you probably need to set up a caching > nameserver to resolve your internal network. > And point all your machines at it. I was wrestling with a few different issues. It finally came down to these few things: I needed to verify that the server was accessible from both Windows clients (XP Pro and Vista Home), and it was necessary to enable each Windows client to resolve the server hostname to its IP address. I did this by adding an entry to the hosts and lmhosts (for good measure) files on both clients. This was easy under XP Pro. It was a little more complicated under Vista -- I got to learn about the User Access Control, which was preventing me from saving changes to the hosts and lmhosts.sam files. After this I was able to view/read files on the share, but not write to it. I had to change directory permissions on the samba share (chmod o+w) to enable users to connect as guests with no authentication. I had assumed that since this is not mentioned anywhere that it was handled by Samba. I was finally able to create/copy files and folders to the share. Woo-hoo! The next step is to implement a form of security that will work for both Windows XP Pro and Windows Vista Home Premium. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com