Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problems with setting domainname (FQDN)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Sat Jun 11, 2005 3:40 pm    Post subject: problems with setting domainname (FQDN) Reply with quote

Hi,

when I start my gentoo box (~x86) I get this login prompt:
Code:
This is inspiron.unknown_domain (Linux...)


I think I get this since I used the cruft script to tidy up my installation. Perhaps I deleted something important, but maybe this is totally unrelated. Who knows?

Ok. Here are my configs:
Code:
(heimdall@inspiron)(7/pts/2)(05:21:06/11/05)-
(%:~/tmp)- cat /etc/conf.d/hostname
# /etc/conf.d/hostname
# Set to the hostname of this machine
HOSTNAME="inspiron"
------------------------------------------------------------------------------------
(heimdall@inspiron)(7/pts/2)(05:21:06/11/05)-
(%:~/tmp)- cat /etc/conf.d/domainname
# /etc/conf.d/domainname
# If you wish to always override DHCP/whatever, set this to 1.
OVERRIDE=1
# To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf
# properly (domain entry in /etc/resolv.conf, and FQDN in /etc/hosts).
DNSDOMAIN="nicundtas.de"
# This only set what /bin/hostname returns.  If you need to setup NIS, meaning
# what /bin/domainname returns, please see:
NISDOMAIN="nicundtas.de"
------------------------------------------------------------------------------------
(heimdall@inspiron)(7/pts/2)(05:21:06/11/05)-
(%:~/tmp)- cat /etc/hosts
# /etc/hosts
127.0.0.1       localhost
192.168.2.1     inspiron.nicundtas.de   inspiron
141.26.64.104   linux.uni-koblenz.de    linux           penguin2
141.26.69.157   helena.uni-koblenz.de   helena

# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
------------------------------------------------------------------------------------
(heimdall@inspiron)(21/pts/2)(05:31:06/11/05)-
(%:~/tmp)- cat /etc/resolv.conf
nameserver 217.237.150.141
nameserver 217.237.150.97
domain nicundtas.de

/etc/init.d/hostname is in runlevel boot, /etc/init.d/domainname is in runlevel default. During boot I can see that the scripts set them successfully ([ok]).

hostname and domainname work ok, but I cannot get my FQDN:
Code:
(heimdall@inspiron)(15/pts/2)(05:26:06/11/05)-
(%:~/tmp)- hostname
inspiron
(heimdall@inspiron)(16/pts/2)(05:26:06/11/05)-
(%:~/tmp)- domainname
nicundtas.de
(heimdall@inspiron)(17/pts/2)(05:26:06/11/05)-
(%:~/tmp)- hostname --fqdn
hostname: Unbekannter Rechner [in English: unknown host]
(heimdall@inspiron)(18/pts/2)(05:26:06/11/05)-
(%:~/tmp)- dnsdomainname
dnsdomainname: Unbekannter Rechner [in English: unknown host]

I really don't know what I am doing wrong...

But the config files should be correct, I think. I didn't change things for a while and some weeks ago all worked fine.

As I sayed above I use a ~x86 system, 2005.0 profile:
Code:
sys-apps/baselayout-1.11.12-r4
sys-apps/net-tools-1.60-r11


So does anybody of you know what could be the problem? I don't have any ideas anymore. :-(

Much thanks in advance,
Tassilo
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Sat Jun 11, 2005 3:51 pm    Post subject: Reply with quote

The first thing I can think of... have you made sure 192.168.2.1 is what's set up as your IP? What's the output of ifconfig?
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Sat Jun 11, 2005 4:21 pm    Post subject: Reply with quote

TrueDFX wrote:
The first thing I can think of... have you made sure 192.168.2.1 is what's set up as your IP? What's the output of ifconfig?


Code:
root@inspiron> ifconfig
eth0      Protokoll:Ethernet  Hardware Adresse 00:06:5B:B9:9B:55
          inet Adresse:192.168.2.2  Bcast:192.168.2.255  Maske:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:196 errors:0 dropped:0 overruns:0 frame:0
          TX packets:197 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:199369 (194.6 Kb)  TX bytes:17918 (17.4 Kb)
          Interrupt:11 Basisadresse:0xec80

Ouch! My IP is 192.168.2.2, not 192.168.2.1! Now I've set /etc/hosts to the correct IP, but I still don't get my FQDN...
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Sat Jun 11, 2005 4:26 pm    Post subject: Reply with quote

I think there's a baselayout bug.
I posted some observations in https://forums.gentoo.org/viewtopic-t-345197-highlight-.html
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Sat Jun 11, 2005 5:04 pm    Post subject: Reply with quote

darkphader wrote:
I think there's a baselayout bug.
I posted some observations in https://forums.gentoo.org/viewtopic-t-345197-highlight-.html

Yes, seems so. Then let's wait for a new baselayout...

Regards,
Tassilo
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Thu Jun 23, 2005 8:58 am    Post subject: Reply with quote

Here's a link to the bug report: https://bugs.gentoo.org/show_bug.cgi?id=96519

Regards,
Tassilo
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Jun 23, 2005 10:22 am    Post subject: Re: problems with setting domainname (FQDN) Reply with quote

Hmm, sorry, sort of forgot about this. I now checked my system, and I have the full domain name in /etc/conf.d/domainname. Could you try and see if that works? (So, set DOMAINNAME="inspiron.nicundtas.de" in there.)
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Thu Jun 23, 2005 10:57 am    Post subject: Re: problems with setting domainname (FQDN) Reply with quote

TrueDFX wrote:
Hmm, sorry, sort of forgot about this. I now checked my system, and I have the full domain name in /etc/conf.d/domainname. Could you try and see if that works? (So, set DOMAINNAME="inspiron.nicundtas.de" in there.)

I think you mean
Code:
DNSDOMAINNAME="inspiron.nicundtas.de"
Right? Well, this doesn't change things for me...

Regards,
Tassilo
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Jun 23, 2005 11:19 am    Post subject: Re: problems with setting domainname (FQDN) Reply with quote

tassilo80 wrote:
TrueDFX wrote:
Hmm, sorry, sort of forgot about this. I now checked my system, and I have the full domain name in /etc/conf.d/domainname. Could you try and see if that works? (So, set DOMAINNAME="inspiron.nicundtas.de" in there.)

I think you mean
Code:
DNSDOMAINNAME="inspiron.nicundtas.de"
Right?
I think I meant DNSDOMAIN :) Sorry.
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Thu Jun 23, 2005 11:34 am    Post subject: Re: problems with setting domainname (FQDN) Reply with quote

TrueDFX wrote:
tassilo80 wrote:
I think you mean
Code:
DNSDOMAINNAME="inspiron.nicundtas.de"
Right?
I think I meant DNSDOMAIN :) Sorry.

Hihi! Seems to be hard to read. :lol:

Nevertheless I've set DNSDOMAIN to the FQDN inspiron.nicundtas.de but it didn't change anything.
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Jun 23, 2005 12:51 pm    Post subject: Reply with quote

Obvious question, but have you restarted your computer? It shouldn't be necessary - restarting the initscripts should be enough - but it's good to make sure anyway.
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Thu Jun 23, 2005 4:59 pm    Post subject: Reply with quote

TrueDFX wrote:
Obvious question, but have you restarted your computer? It shouldn't be necessary - restarting the initscripts should be enough - but it's good to make sure anyway.
Yes. First I tried restarting the init scripts and when this didn't work I restarted the computer, but I didn't help anyway.
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Jun 23, 2005 5:43 pm    Post subject: Reply with quote

Well, I don't see anything wrong with the configuration files you posted at all (I may be missing something though)... perhaps it's something else?
Code:
$ strace hostname -f 2>&1 | grep /etc
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/etc/resolv.conf", O_RDONLY)      = 3
open("/etc/nsswitch.conf", O_RDONLY)    = 3
read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 4096) = 503
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/etc/host.conf", O_RDONLY)        = 3
read(3, "# /etc/host.conf:\n# $Header: /va"..., 4096) = 1302
open("/etc/hosts", O_RDONLY)            = 3
read(3, "# /etc/hosts:  This file describ"..., 4096) = 75
So... what's in your nsswitch.conf and host.conf?
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Thu Jun 23, 2005 6:59 pm    Post subject: Reply with quote

TrueDFX wrote:
So... what's in your nsswitch.conf and host.conf?
Code:
root@inspiron> cat /etc/nsswitch.conf
passwd:         compat
group:          compat
shadow:         compat

hosts:          dns [!UNAVAIL=return] files
networks:       nis [NOTFOUND=return] files
ethers:         nis [NOTFOUND=return] files
protocols:      nis [NOTFOUND=return] files
rpc:            nis [NOTFOUND=return] files
services:       nis [NOTFOUND=return] files

root@inspiron> grep -E -v "^#" /etc/host.conf
order hosts, bind
mdns off
multi off
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu Jun 23, 2005 7:08 pm    Post subject: Reply with quote

Your nsswitch.conf is very different from mine. Mine is:
Code:
# /etc/nsswitch.conf:
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nsswitch.conf,v 1.1 2005/05/17 00:52:41 vapier Exp $

passwd:      compat
shadow:      compat
group:       compat

# passwd:    db files nis
# shadow:    db files nis
# group:     db files nis

hosts:       files dns
networks:    files dns

services:    db files
protocols:   db files
rpc:         db files
ethers:      db files
netmasks:    files
netgroup:    files
bootparams:  files

automount:   files
aliases:     files
I have never modified this file manually that I can remember.

Any luck for you if you restore it to the default ($PORTDIR/sys-libs/glibc/files/nsswitch.conf)? (I'm again not sure if rebooting is necessary.)
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Thu Jun 23, 2005 7:34 pm    Post subject: Reply with quote

TrueDFX wrote:
Any luck for you if you restore it to the default ($PORTDIR/sys-libs/glibc/files/nsswitch.conf)? (I'm again not sure if rebooting is necessary.)
Hey, you're my hero! After doing that and restarting /etc/init.d/domainname hostname -f and dnsdomainname work as expected!

But I really can't remember changing anything in my nsswitch.conf... :?

Thanks a lot!
Tassilo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum