🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #189514

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

#189514
From: Thufir
Date: Sun, 20 Aug 2006 06:08
120 lines
4796 bytes
Jack Cuyler wrote:
[...]

I still get localhost.localdomain for a hostname.

> Also make sure that /etc/nsswitch.conf has the following line:
>
> hosts:       files dns
>
> or it won't ever be read.

Yes.

[...]
> /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.

Aha!

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

Yes.


What I have:

[root@localhost ~]#
[root@localhost ~]# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#       nisplus or nis+         Use NIS+ (NIS version 3)
#       nis or yp               Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service)
#       files                   Use the local files
#       db                      Use the local database (.db) files
#       compat                  Use NIS on compat mode
#       hesiod                  Use Hesiod for user lookups
#       [NOTFOUND=return]       Stop searching if not found so far
#

# To use db, put the "db" in front of "files" for entries you want to
be
# looked up first in the databases
#
# Example:
#passwd:    db files nisplus nis
#shadow:    db files nisplus nis
#group:     db files nisplus nis

passwd:     files
shadow:     files
group:      files

#hosts:     db files nisplus nis dns
hosts:      files dns

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files

netgroup:   nisplus

publickey:  nisplus

automount:  files nisplus
aliases:    files nisplus

[root@localhost ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=geidiprime.servebeer.com
[root@localhost ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.

127.0.0.1               geidiprime servebeer.com


[root@localhost ~]# /etc/init.d/xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
[root@localhost ~]# date
Sun Aug 20 00:04:43 IST 2006
[root@localhost ~]# hostname
localhost.localdomain
[root@localhost ~]#



-Thufir
Technical Details
Message-ID: <1156054081.113295.205200@p79g2000cwp.googlegroups.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!postnews.google.com!p79g2000cwp.googlegroups.com!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> <DVPFg.25893$8j3.24237@twister.nyroc.rr.com>

Show Full Headers
Complete Article Headers
Message-ID: <1156054081.113295.205200@p79g2000cwp.googlegroups.com>
Subject: Re: (was Re: setting FQDN in /etc/hosts)
Date: Sun, 20 Aug 2006 06:08:01 +0000
From: "Thufir" <hawat.thufir@gmail.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> <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!postnews.google.com!p79g2000cwp.googlegroups.com!not-for-mail
Newsgroups: news.software.readers
Organization: http://groups.google.com
Lines: 120
NNTP-Posting-Host: 24.84.131.197
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1156054086 13913 127.0.0.1 (20 Aug 2006 06:08:06
 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 20 Aug 2006 06:08:06 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US;
 pango-text,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: p79g2000cwp.googlegroups.com; posting-host=24.84.131.197;
 posting-account=fzKvuw0AAABwacCCYjdJ_2qlt6GHSH_U