On Wed, Mar 09, 2005 at 07:55:52PM -0500, Neal Becker wrote: > Suppose my FQDN is a.b.c. I'd like to set hostname to a.b.c. What goes > in /etc/hosts? I believe that X won't work unless you have: > > 127.0.0.1 localhost localhost.localdomain a.b.c > > But this won't work with nfs4. If hostname is set to a.b.c and the entry > a.b.c is in hosts under 127.0.0.1, then when I try to mount a server (a.b.c > is client) I get this: > >> mount: can't get address for a.b.c > > I guess mount isn't figuring out there is an eth0 interface and using that > address. If I remove the entry from hosts, and set the hostname to just > 'a', mount works. It makes no rhyme nor reason for me as to why RH installer or network config tools set up /etc/hosts the way they do (as you describe above). It clearly doesn't work right. I always find I have to manually fix it. The correct form should be like this: 127.0.0.1 localhost localhost.localdomain 192.168.0.1 myhost myhost.mydomain unless your machine is assigned an address by dhcp, in which case use only the first line. -- ---- Fred Smith -- fredex@xxxxxxxxxxxxxxxxxxxxxx ----------------------------- The eyes of the Lord are everywhere, keeping watch on the wicked and the good. ----------------------------- Proverbs 15:3 (niv) -----------------------------
Attachment:
pgpWI4nM7ovs6.pgp
Description: PGP signature