🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #189502

Re: (was Re: setting FQDN in /etc/hosts)

#189502
From: Jack Cuyler
Date: Sun, 20 Aug 2006 02:37
50 lines
3342 bytes
On Sat, 19 Aug 2006 14:07:58 +0100, Whiskers wrote:

snip

> I suspect that your /etc/hosts file is not being read, so is perhaps 
> faulty somehow.  Make sure there is a newline at the end of the line; an
> empty line before the end of the file should do no harm, and will make
> sure that the newline character is present.  Also make sure that the 
> permissions are appropriate - eg

Also make sure that /etc/nsswitch.conf has the following line:

hosts:       files dns

or it won't ever be read.

> [mark@tavy etc]$ ls -l hosts
> -rw-r--r--  2 root root 181 Jul 27 21:11 hosts
> [mark@tavy etc]$ 
> 
> You don't need to try to run leafnode to see if your /etc/hosts file is 
> being interpreted as intended; the hostname command will tell you what 
> your system's hostname is:
> 
> [mark@tavy etc]$ hostname
> tavy.mobile.private
> [mark@tavy etc]$ 

/etc/hosts does not set the system's hostname.  It is used as a reference
in hostname resolution.  Whenever a hostname need to be resolved, the
system checks /etc/hosts first and then dns.  Depending on the OS, the
hostname is set in /etc/hostname, /etc/conf.d/hostname,
/etc/sysconfig/network.  Redhat and Fedora use /etc/sysconfig/network.

> Note that the command prompt on my system also shows the name of the
> system; your's probably does too - so a prompt with the word localhost
> in it is an indication that the hostname is not being picked up.

There should be a "HOSTNAME=" line in /etc/sysconfig/network.

-- 
Cheers,
Jack

NERVE GAS IS NOT A TOY
NERVE GAS IS NOT A TOY
NERVE GAS IS NOT A TOY
NERVE GAS IS NOT A TOY

	Bart Simpson on chalkboard in episode 2F32
Technical Details
Message-ID: <DVPFg.25893$8j3.24237@twister.nyroc.rr.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeeds.sol.net!uwm.edu!hammer.uoregon.edu!usenet01.sei.cmu.edu!news.cse.ohio-state.edu!news.maxwell.syr.edu!news-rtr.nyroc.rr.com!news-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!53ab2750!not-for-mail
References: <1155922996.353013.89150@h48g2000cwc.googlegroups.com> <6lihr3-rpm.ln1@ID-107770.user.individual.net> <1155955717.407500.277610@m73g2000cwd.googlegroups.com> <e2fjr3-6lc.ln1@ID-107770.user.individual.net>

Show Full Headers
Complete Article Headers
Message-ID: <DVPFg.25893$8j3.24237@twister.nyroc.rr.com>
Subject: Re: (was Re: setting FQDN in /etc/hosts)
Date: Sun, 20 Aug 2006 02:37:23 GMT
From: "Jack Cuyler" <jjvcuyler@drunkenbastards.com>
References: <1155922996.353013.89150@h48g2000cwc.googlegroups.com> <6lihr3-rpm.ln1@ID-107770.user.individual.net> <1155955717.407500.277610@m73g2000cwd.googlegroups.com> <e2fjr3-6lc.ln1@ID-107770.user.individual.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeeds.sol.net!uwm.edu!hammer.uoregon.edu!usenet01.sei.cmu.edu!news.cse.ohio-state.edu!news.maxwell.syr.edu!news-rtr.nyroc.rr.com!news-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!53ab2750!not-for-mail
Newsgroups: news.software.readers
X-Face: 4(aM5\}ZCmxvc`T0N&&bmaltK"5Bx`/.zybrc6.?14w&hgB:+h#fh>9H4e/\'Ootb<SP(Jp!flqF9o"=7Fjx:SI)&cAd7)wJ|CD&C,1uvZ0$w(W}ZS|H<t-Rra,$0uRDXSr6i8Td2>J=BlSjzf{d3psdee3-V/IlxV$Y#>~mUw48i!}~W1"VJ;
 h,H,3?9+N,0"9:5{1\J|ISwpo5z#yQV$dF|/xf2ysTZt"+8IpqK&m@2E{_(!siA31Q4>rC=@S;
 Ky"(G"]+c~(vMf3J|/<_DHF6WUV6F
User-Agent: pan 0.108 (Mama's Little Joyboy Loves Lobsters, Lobsters)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Lines: 50
NNTP-Posting-Host: 69.204.146.227
X-Complaints-To: abuse@rr.com
X-Trace: twister.nyroc.rr.com 1156041443 69.204.146.227 (Sat,
NNTP-Posting-Date: Sat, 19 Aug 2006 22:37:23 EDT
Organization: Road Runner