Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to set the domain for a Gentoo box?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Dee-ehn
n00b
n00b


Joined: 22 Sep 2004
Posts: 10

PostPosted: Tue Sep 28, 2004 11:40 am    Post subject: How to set the domain for a Gentoo box? Reply with quote

I installed Gentoo linux (stage 2) and it works quite allright. Just one problem, I can't set the domain of my linux box. Although I did everything according to the guides (set up the domain in the correct file and do a rc-update) it still reports as my_gentoo.unknown_domain.

So there's my question: can anybody enlight me a little?

TIA!
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Sep 28, 2004 11:45 am    Post subject: Reply with quote

What does
Code:
hostname -f

report ?
Which file did you put the domainname in, and what rc script did you run?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Doc7
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jul 2004
Posts: 133
Location: AC-Germany

PostPosted: Tue Sep 28, 2004 12:10 pm    Post subject: Reply with quote

- check /etc/dnsdomainname
Code:
yourdomain.org

- check /etc/init.d/domainname status
Code:
* status:  started

- check /etc/hosts
Code:
...
127.0.0.1   yourhost.yourdomain.org   yourhost   localhost
...
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Sep 28, 2004 12:36 pm    Post subject: Reply with quote

Doc7 wrote:
- check /etc/hosts
Code:
...
127.0.0.1   yourhost.yourdomain.org   yourhost   localhost
...

No. Nonononononono.
NEVER alter the localhost definition - for any reason.

And even IF - never put two aliases for one IP in hosts.

Code:
127.0.0.1   localhost.localdomain localhost
ip.ad.dr.ess  hostname

_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Doc7
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jul 2004
Posts: 133
Location: AC-Germany

PostPosted: Tue Sep 28, 2004 1:45 pm    Post subject: Reply with quote

pllz give a hint why

i always used this and never had any problems.

EDIT:

man hosts:
Code:
...
192.168.1.10  foo.mydomain.org   foo
...
Back to top
View user's profile Send private message
gabe-kai
n00b
n00b


Joined: 03 Sep 2003
Posts: 63
Location: Michigan, USA

PostPosted: Tue Sep 28, 2004 3:17 pm    Post subject: Yes, please enlighten us. Reply with quote

The Gentoo Handbook says to do exactly this in the case of being an isolated machine or using nameservers for name resolution:

Gentoo Handbook wrote:
If your system is the only system (or the nameservers handle all name resolution) a single line is sufficient. For instance, if you want to call your system tux.homenetwork:

Code:
Code Listing 19: /etc/hosts for lonely or fully integrated PCs

127.0.0.1     tux.homenetwork tux localhost


Save and exit the editor to continue.


I have always done this, if my hosts file reads:
Code:
127.0.0.1          localhost
192.169.1.4        narcissus.home.net        narcissus

My login prompt will be: narcissus.unknown_domain etc...
But if it reads:
Code:
127.0.0.1          narcissus.home.net        narcissus        localhost
192.168.1.4        narcissus.home.net        narcissus

Then my login prompt will be: narcissus.home.net etc...

A "right" way would be much appreciated.
_________________
"People demand freedom of speech to make up for the freedom of thought which they avoid."
- Soren Aabye Kierkegaard
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Wed Sep 29, 2004 1:49 pm    Post subject: Reply with quote

If you have DNS entries for your machine in a nameserver somewhere then that is the right way.
If you don't, then you may need to tweak the /etc/hosts entries to give you the correct responses.

And - running Gentoo on a stand-alone machine ?
How would you use Portage and everything ?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
gabe-kai
n00b
n00b


Joined: 03 Sep 2003
Posts: 63
Location: Michigan, USA

PostPosted: Wed Sep 29, 2004 5:50 pm    Post subject: Reply with quote

adaptr wrote:
And - running Gentoo on a stand-alone machine ?
How would you use Portage and everything ?

Good point, that never even dawned on me, I just remembered it from the Installation Handbook.

So my network is not using a nameserver; if I set 127.0.0.1 back to simply localhost, my system sets the domain to homenetwork when I boot, and echos narcissus.homenetwork when I type "domainname -f". However, my login prompts all look like:
Code:
This is narcissus.unknown_domain (Linux i686 2.6.8-r3) <time>

narcissus login:

How can I make it say narcissus.homenetwork again?
_________________
"People demand freedom of speech to make up for the freedom of thought which they avoid."
- Soren Aabye Kierkegaard
Back to top
View user's profile Send private message
Doc7
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jul 2004
Posts: 133
Location: AC-Germany

PostPosted: Thu Sep 30, 2004 8:33 am    Post subject: Reply with quote

i got the same thing...

if i set 127.0.0.1 in /etc/hosts to "localhost" only "domainname -f" seems right.. but my prompt shows a wrong domain and i get a message about unknown domain as i "startx".

would be nice to know how this should be done "right"

i probably will try with a DNS-server sometime, but i seriously doubt that this would change the above behaviour.
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Thu Sep 30, 2004 10:37 am    Post subject: Reply with quote

For a box called server on the domain domain.tld

make sure you've got
domain domain.tld
at the top of your /etc/resolv.conf

If your computer has a static IP address then you should have
Code:
127.0.0.1      localhost
static.ip.address     server.domain.tld   server
If your computer has a dynamic IP address you should have
Code:
127.0.0.1      server.domain.tld    server    localhost

/etc/dnsdomainname should contain domain.tld and /etc/hostname should contain server /etc/init.d/domainname should be added to the default runlevel.
Back to top
View user's profile Send private message
chemical chris
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2004
Posts: 80
Location: l33ds (uk)

PostPosted: Sat Oct 09, 2004 9:41 pm    Post subject: Reply with quote

i appologise in advance if i have missed anything blatentally obyouse.. however im haveing the same problem

Code:

bash-2.05b# cat /etc/dnsdomainname
coreline.local


/etc/hosts looks like this
127.0.0.1 rollright.coreline.local rollright localhost

also, when recompiling my kernel (to fix scsi) i ran into this
Code:

bash-2.05b# make
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
dnsdomainname: Unknown host
Kernel: arch/i386/boot/bzImage is ready
  Building modules, stage 2.
  MODPOST
bash-2.05b#


any help is much appriceated
Back to top
View user's profile Send private message
chemical chris
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2004
Posts: 80
Location: l33ds (uk)

PostPosted: Sun Oct 10, 2004 9:28 am    Post subject: Reply with quote

update:
boath domainname and hostname resolve corectally when the macghene is starting... but still... at login i get newgrange.unknowen_domain
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Sun Oct 10, 2004 1:42 pm    Post subject: Reply with quote

have you got
domain domain.tld
at the top of your resolv.conf as I said above?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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