On 10/27/23 12:26, gene heskett wrote:
On 10/27/23 11:43, Greg Wooledge wrote:
On Fri, Oct 27, 2023 at 11:13:59AM -0400, gene heskett wrote:
You saw my hosts entry in the last post, but again
192.168.71.3 coyote.home.arpa coyote
That looks fine to me.
but after a reboot, domainname returns none, and the /etc/domainname
file
!!!!!
So I just sudo edited /etc/domainname, and entered "home.arpa\return"
and
wrote the flle.
!!!!!
gene@coyote:/etc$ sudo nano domainnane
[sudo] password for gene:
gene@coyote:/etc$ domainname
(none)
Gene. Please read what I'm saying.
The "domainname" command is NOT FOR DNS. It's for NIS.
You should not be using it.
Remove the /etc/domainname file because it's just going to confuse you.
You don't need one. You don't WANT one. It's for NIS. Not for DNS.
Not for hosts-file-based name resolution.
Done.
If your system's hostname is "coyote" -- i.e. if the "hostname" command
gives you "coyote" as output -- then you're already finished.
Debian reads /etc/hostname at boot time to set the hostname. This file
(on this computer) should contain the word "coyote".
Your /etc/hosts file contains the line posted above, which maps the
hostname "coyote" to the fully qualified domain name "coyote.home.arpa".
This means your DNS domain name is "home.arpa".
If you run the "dnsdomainname" command, you should see "home.arpa" as
output.
Here's what my system's output looks like:
unicorn:~$ hostname
unicorn
unicorn:~$ domainname
(none)
unicorn:~$ dnsdomainname
wooledge.org
And here's what yours should say:
gene@coyote:/etc$ hostname
coyote
gene@coyote:/etc$ domainname
(none)
gene@coyote:/etc$ dnsdomainname
home.arpa
So this is what I get now:
gene@coyote:/etc$ dnsdomainname
home.arpa
gene@coyote:/etc$ hostname
coyote.home.arpa
gene@coyote:/etc$ cat hostname
coyote
Is that correct and will it withstand a reboot?
.
The man pages, IMO, should explain the diffs here. Historically, they do
not. Leads to a lot of my confusion.
Thanks Greg.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis