* [gentoo-user] Misconfigured system
@ 2006-12-21 19:16 Kevin O'Gorman
2006-12-21 20:01 ` Jeff Rollin
0 siblings, 1 reply; 9+ messages in thread
From: Kevin O'Gorman @ 2006-12-21 19:16 UTC (permalink / raw
To: gentoo-user
I'm beginning to think my system configuration is a mess. It started with
worrying about Postfix, but has quickly escalated.
I was trying to figure out what Postfix knows and where it knows it when
I found that I seem to have no domain name. That is, the shell command
domainname(1) returns "(none)". This seems odd, because I've got
it set up as nearly as I can see according to gentoo docs
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2
since my /etc/conf.d/net contains (among other things)
dns_domain="kosmanor.com"
BTW: it also says to set dns_domain_lo, but I have no name for my
internal network, and
haven't seen a reason to create one.
Nevertheless, even the system calls getdomainname(2) and uname(2) return the
string "(none)".
What am I missing?
--
Kevin O'Gorman, PhD
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Misconfigured system
2006-12-21 19:16 [gentoo-user] Misconfigured system Kevin O'Gorman
@ 2006-12-21 20:01 ` Jeff Rollin
2006-12-22 3:42 ` Kevin O'Gorman
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Rollin @ 2006-12-21 20:01 UTC (permalink / raw
To: gentoo-user
On 21/12/06, Kevin O'Gorman <kogorman@gmail.com> wrote:
> I'm beginning to think my system configuration is a mess. It started with
> worrying about Postfix, but has quickly escalated.
>
> I was trying to figure out what Postfix knows and where it knows it when
> I found that I seem to have no domain name. That is, the shell command
> domainname(1) returns "(none)". This seems odd, because I've got
> it set up as nearly as I can see according to gentoo docs
> http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2
> since my /etc/conf.d/net contains (among other things)
> dns_domain="kosmanor.com"
> BTW: it also says to set dns_domain_lo, but I have no name for my
> internal network, and
> haven't seen a reason to create one.
>
> Nevertheless, even the system calls getdomainname(2) and uname(2) return the
> string "(none)".
>
> What am I missing?
>
That's because the command domainname and the systemcalls
getdomainname(2) are return the NIS domainname, not the IP domainname.
uname(2) returns the domainname of the machine the kernel was compiled
on, at the time when it was compiled. To find the tcp/ip domain name
of a system, use hostname(1).
Yes, it is daft - but, that's what happens when an OS acquires a
history, I suppose
Jeff.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Misconfigured system
2006-12-21 20:01 ` Jeff Rollin
@ 2006-12-22 3:42 ` Kevin O'Gorman
2006-12-22 5:45 ` Kevin O'Gorman
0 siblings, 1 reply; 9+ messages in thread
From: Kevin O'Gorman @ 2006-12-22 3:42 UTC (permalink / raw
To: gentoo-user
On 12/21/06, Jeff Rollin <jeff.rollin@gmail.com> wrote:
> On 21/12/06, Kevin O'Gorman <kogorman@gmail.com> wrote:
> > I'm beginning to think my system configuration is a mess. It started with
> > worrying about Postfix, but has quickly escalated.
> >
> > I was trying to figure out what Postfix knows and where it knows it when
> > I found that I seem to have no domain name. That is, the shell command
> > domainname(1) returns "(none)". This seems odd, because I've got
> > it set up as nearly as I can see according to gentoo docs
> > http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2
> > since my /etc/conf.d/net contains (among other things)
> > dns_domain="kosmanor.com"
> > BTW: it also says to set dns_domain_lo, but I have no name for my
> > internal network, and
> > haven't seen a reason to create one.
> >
> > Nevertheless, even the system calls getdomainname(2) and uname(2) return the
> > string "(none)".
> >
> > What am I missing?
> >
>
> That's because the command domainname and the systemcalls
> getdomainname(2) are return the NIS domainname, not the IP domainname.
> uname(2) returns the domainname of the machine the kernel was compiled
> on, at the time when it was compiled. To find the tcp/ip domain name
> of a system, use hostname(1).
>
> Yes, it is daft - but, that's what happens when an OS acquires a
> history, I suppose
Thanks, but that won't get me an IP domainname, because all that is there
is the name of the node. Should I change that in /etc/conf.d/net???
++ kevin
--
Kevin O'Gorman, PhD
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Misconfigured system
2006-12-22 3:42 ` Kevin O'Gorman
@ 2006-12-22 5:45 ` Kevin O'Gorman
2006-12-22 12:20 ` David Relson
0 siblings, 1 reply; 9+ messages in thread
From: Kevin O'Gorman @ 2006-12-22 5:45 UTC (permalink / raw
To: gentoo-user
On 12/21/06, Kevin O'Gorman <kogorman@gmail.com> wrote:
> On 12/21/06, Jeff Rollin <jeff.rollin@gmail.com> wrote:
> > On 21/12/06, Kevin O'Gorman <kogorman@gmail.com> wrote:
> > > I'm beginning to think my system configuration is a mess. It started with
> > > worrying about Postfix, but has quickly escalated.
> > >
> > > I was trying to figure out what Postfix knows and where it knows it when
> > > I found that I seem to have no domain name. That is, the shell command
> > > domainname(1) returns "(none)". This seems odd, because I've got
> > > it set up as nearly as I can see according to gentoo docs
> > > http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2
> > > since my /etc/conf.d/net contains (among other things)
> > > dns_domain="kosmanor.com"
> > > BTW: it also says to set dns_domain_lo, but I have no name for my
> > > internal network, and
> > > haven't seen a reason to create one.
> > >
> > > Nevertheless, even the system calls getdomainname(2) and uname(2) return the
> > > string "(none)".
> > >
> > > What am I missing?
> > >
> >
> > That's because the command domainname and the systemcalls
> > getdomainname(2) are return the NIS domainname, not the IP domainname.
> > uname(2) returns the domainname of the machine the kernel was compiled
> > on, at the time when it was compiled. To find the tcp/ip domain name
> > of a system, use hostname(1).
> >
> > Yes, it is daft - but, that's what happens when an OS acquires a
> > history, I suppose
>
> Thanks, but that won't get me an IP domainname, because all that is there
> is the name of the node. Should I change that in /etc/conf.d/net???
>
Oops. I should have known I could answer my own question with a little more
digging. I now see that there's
hostname
hostname --fqdn
dnsdomainname
and they all work by looking in /etc/host.conf, and if (as is true
here) that says
to use the hosts file first, it looks for it in /etc/hosts, which has the fqdn.
I seem to dimly recall that it actually looks for the first
non-comment, but that
cannot be quite right, because localhost comes first in my copy.
Maybe it's the first
routable IP number?
I think this sub-problem is solved. I've commented my config files a
bit more, so I
won't make the same mistake again.
++ kevin
--
Kevin O'Gorman, PhD
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Misconfigured system
2006-12-22 5:45 ` Kevin O'Gorman
@ 2006-12-22 12:20 ` David Relson
2006-12-24 12:09 ` Mick
0 siblings, 1 reply; 9+ messages in thread
From: David Relson @ 2006-12-22 12:20 UTC (permalink / raw
To: gentoo-user
On Thu, 21 Dec 2006 21:45:07 -0800
Kevin O'Gorman wrote:
...[snip]...
> Oops. I should have known I could answer my own question with a
> little more digging. I now see that there's
> hostname
> hostname --fqdn
> dnsdomainname
> and they all work by looking in /etc/host.conf, and if (as is true
> here) that says
> to use the hosts file first, it looks for it in /etc/hosts, which has
> the fqdn. I seem to dimly recall that it actually looks for the first
> non-comment, but that
> cannot be quite right, because localhost comes first in my copy.
> Maybe it's the first
> routable IP number?
>
> I think this sub-problem is solved. I've commented my config files a
> bit more, so I
> won't make the same mistake again.
>
> ++ kevin
Now, I'm curious! On my system, I see the following:
dnsdomainname osagesoftware.com
hostname osage.osagesoftware.com
hostname --fqdn osage.osagesoftware.com
/etc/hosts contains:
192.168.1.10 osage.osagesoftware.com osage
"strace -feopen" shows that /etc/hosts is opened by "hostname --fqdn"
but not "hostname".
What have I got wrong?
Regards,
David
P.S. Greetings from one Kiewit alumni to another ...
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Misconfigured system
2006-12-22 12:20 ` David Relson
@ 2006-12-24 12:09 ` Mick
2006-12-24 14:08 ` David Relson
0 siblings, 1 reply; 9+ messages in thread
From: Mick @ 2006-12-24 12:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]
On Friday 22 December 2006 12:20, David Relson wrote:
> On Thu, 21 Dec 2006 21:45:07 -0800
> Kevin O'Gorman wrote:
>
> ...[snip]...
>
> > Oops. I should have known I could answer my own question with a
> > little more digging. I now see that there's
> > hostname
> > hostname --fqdn
> > dnsdomainname
> > and they all work by looking in /etc/host.conf, and if (as is true
> > here) that says
> > to use the hosts file first, it looks for it in /etc/hosts, which has
> > the fqdn. I seem to dimly recall that it actually looks for the first
> > non-comment, but that
> > cannot be quite right, because localhost comes first in my copy.
> > Maybe it's the first
> > routable IP number?
> >
> > I think this sub-problem is solved. I've commented my config files a
> > bit more, so I
> > won't make the same mistake again.
> >
> > ++ kevin
>
> Now, I'm curious! On my system, I see the following:
>
> dnsdomainname osagesoftware.com
> hostname osage.osagesoftware.com
> hostname --fqdn osage.osagesoftware.com
>
> /etc/hosts contains:
>
> 192.168.1.10 osage.osagesoftware.com osage
>
> "strace -feopen" shows that /etc/hosts is opened by "hostname --fqdn"
> but not "hostname".
>
> What have I got wrong?
>
> Regards,
>
> David
>
> P.S. Greetings from one Kiewit alumni to another ...
I discovered that the order of entries on the localhost line is important to
avoid hostname being identified as "none". I suppose in your system it
should be:
127.0.0.1 osage.osagesoftware.com osage localhost
HTH
--
Regards,
Mick
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Misconfigured system
2006-12-24 12:09 ` Mick
@ 2006-12-24 14:08 ` David Relson
2006-12-24 16:03 ` Kevin O'Gorman
2006-12-24 16:31 ` Andrey Gerasimenko
0 siblings, 2 replies; 9+ messages in thread
From: David Relson @ 2006-12-24 14:08 UTC (permalink / raw
To: gentoo-user
On Sun, 24 Dec 2006 12:09:13 +0000
Mick wrote:
...[snip]...
> > Now, I'm curious! On my system, I see the following:
> >
> > dnsdomainname osagesoftware.com
> > hostname osage.osagesoftware.com
> > hostname --fqdn osage.osagesoftware.com
> >
> > /etc/hosts contains:
> >
> > 192.168.1.10 osage.osagesoftware.com osage
> >
> > "strace -feopen" shows that /etc/hosts is opened by "hostname
> > --fqdn" but not "hostname".
> >
> > What have I got wrong?
> >
> > Regards,
> >
> > David
> >
> > P.S. Greetings from one Kiewit alumni to another ...
>
> I discovered that the order of entries on the localhost line is
> important to avoid hostname being identified as "none". I suppose in
> your system it should be:
>
> 127.0.0.1 osage.osagesoftware.com osage localhost
Curiouser and curiouser...
Using your suggested line as the complete content of my /etc/hosts file
has _no_ effect at all.
As an experiment, I tried modifying /etc/conf.d/hostname to have just
a test name, i.e. osagexxx, and restarting /etc/init.d/hostname. My
system was not at all happy with that.
### hostname ; hostname -s ; hostname --fqdn ; dnsdomainname
osagexxx
hostname: Unknown host
hostname: Unknown host
dnsdomainname: Unknown host
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Misconfigured system
2006-12-24 14:08 ` David Relson
@ 2006-12-24 16:03 ` Kevin O'Gorman
2006-12-24 16:31 ` Andrey Gerasimenko
1 sibling, 0 replies; 9+ messages in thread
From: Kevin O'Gorman @ 2006-12-24 16:03 UTC (permalink / raw
To: gentoo-user
On 12/24/06, David Relson <relson@osagesoftware.com> wrote:
> On Sun, 24 Dec 2006 12:09:13 +0000
> Mick wrote:
>
> ...[snip]...
> > > Now, I'm curious! On my system, I see the following:
> > >
> > > dnsdomainname osagesoftware.com
> > > hostname osage.osagesoftware.com
> > > hostname --fqdn osage.osagesoftware.com
> > >
> > > /etc/hosts contains:
> > >
> > > 192.168.1.10 osage.osagesoftware.com osage
> > >
> > > "strace -feopen" shows that /etc/hosts is opened by "hostname
> > > --fqdn" but not "hostname".
> > >
> > > What have I got wrong?
> > >
> > > Regards,
> > >
> > > David
> > >
> > > P.S. Greetings from one Kiewit alumni to another ...
> >
> > I discovered that the order of entries on the localhost line is
> > important to avoid hostname being identified as "none". I suppose in
> > your system it should be:
> >
> > 127.0.0.1 osage.osagesoftware.com osage localhost
>
> Curiouser and curiouser...
>
> Using your suggested line as the complete content of my /etc/hosts file
> has _no_ effect at all.
>
> As an experiment, I tried modifying /etc/conf.d/hostname to have just
> a test name, i.e. osagexxx, and restarting /etc/init.d/hostname. My
> system was not at all happy with that.
>
> ### hostname ; hostname -s ; hostname --fqdn ; dnsdomainname
>
> osagexxx
> hostname: Unknown host
> hostname: Unknown host
> dnsdomainname: Unknown host
As the OP, I checked this out.
Right now, the first two non-comment lines in /etc/hosts are
127.0.0.1 localhost
64.166.164.49 treat.kosmanor.com treat
Adding stuff to the localhost line has no effect.
Fooling with the 64...... line does. The first thing after the IP
seems to be taken as the
FQDN by "hostname --fqdn", so the order on the line is important.
Neither of these affects the results of "hostname", although I did not
reboot to test the
theory that this might make a difference. It seems more likely this comes from
/etc/conf.d/hostname
++ kevin
--
Kevin O'Gorman, PhD
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Misconfigured system
2006-12-24 14:08 ` David Relson
2006-12-24 16:03 ` Kevin O'Gorman
@ 2006-12-24 16:31 ` Andrey Gerasimenko
1 sibling, 0 replies; 9+ messages in thread
From: Andrey Gerasimenko @ 2006-12-24 16:31 UTC (permalink / raw
To: gentoo-user
On Sun, 24 Dec 2006 17:08:14 +0300, David Relson
<relson@osagesoftware.com> wrote:
> On Sun, 24 Dec 2006 12:09:13 +0000
> Mick wrote:
>
> ..[snip]...
>> > Now, I'm curious! On my system, I see the following:
>> >
>> > dnsdomainname osagesoftware.com
>> > hostname osage.osagesoftware.com
>> > hostname --fqdn osage.osagesoftware.com
>> >
>> > /etc/hosts contains:
>> >
>> > 192.168.1.10 osage.osagesoftware.com osage
>> >
>> > "strace -feopen" shows that /etc/hosts is opened by "hostname
>> > --fqdn" but not "hostname".
>> >
>> > What have I got wrong?
>> >
>> > Regards,
>> >
>> > David
>> >
>> > P.S. Greetings from one Kiewit alumni to another ...
>>
>> I discovered that the order of entries on the localhost line is
>> important to avoid hostname being identified as "none". I suppose in
>> your system it should be:
>>
>> 127.0.0.1 osage.osagesoftware.com osage localhost
>
> Curiouser and curiouser...
>
> Using your suggested line as the complete content of my /etc/hosts file
> has _no_ effect at all.
>
> As an experiment, I tried modifying /etc/conf.d/hostname to have just
> a test name, i.e. osagexxx, and restarting /etc/init.d/hostname. My
> system was not at all happy with that.
> ### hostname ; hostname -s ; hostname --fqdn ; dnsdomainname
>
> osagexxx
> hostname: Unknown host
> hostname: Unknown host
> dnsdomainname: Unknown host
>
As far as I understand, with modersn scripts the hostname is returned by
the /etc/init.d/hostname service, which gets the host name from
/etc/conf.d/hostname, whicj should have a line like
HOSTNAME="osage"
The domainname is set by domainname as
#domainname osagesoftware.com
After that, according to man hostname, FQDN will be
osage.osagesoftware.com when osage can be resolved, either by the real DNS
server or by 129.0.0.1 osage.osagesoftware.com inhosts.
Hope that helps. I recall I examined that after Gentoo setup according to
the handbook displayed unknowndomain before the login prompt.
--
Andrei Gerasimenko
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-12-24 16:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-21 19:16 [gentoo-user] Misconfigured system Kevin O'Gorman
2006-12-21 20:01 ` Jeff Rollin
2006-12-22 3:42 ` Kevin O'Gorman
2006-12-22 5:45 ` Kevin O'Gorman
2006-12-22 12:20 ` David Relson
2006-12-24 12:09 ` Mick
2006-12-24 14:08 ` David Relson
2006-12-24 16:03 ` Kevin O'Gorman
2006-12-24 16:31 ` Andrey Gerasimenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox