View previous topic :: View next topic |
Author |
Message |
Dee-ehn n00b

Joined: 22 Sep 2004 Posts: 10
|
Posted: Tue Sep 28, 2004 11:40 am Post subject: How to set the domain for a Gentoo box? |
|
|
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 |
|
 |
adaptr Watchman


Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Tue Sep 28, 2004 11:45 am Post subject: |
|
|
What does
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 |
|
 |
Doc7 Tux's lil' helper


Joined: 18 Jul 2004 Posts: 133 Location: AC-Germany
|
Posted: Tue Sep 28, 2004 12:10 pm Post subject: |
|
|
- check /etc/dnsdomainname
- check /etc/init.d/domainname status
- check /etc/hosts
Code: | ...
127.0.0.1 yourhost.yourdomain.org yourhost localhost
...
|
|
|
Back to top |
|
 |
adaptr Watchman


Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Tue Sep 28, 2004 12:36 pm Post subject: |
|
|
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 |
|
 |
Doc7 Tux's lil' helper


Joined: 18 Jul 2004 Posts: 133 Location: AC-Germany
|
Posted: Tue Sep 28, 2004 1:45 pm Post subject: |
|
|
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 |
|
 |
gabe-kai n00b


Joined: 03 Sep 2003 Posts: 63 Location: Michigan, USA
|
Posted: Tue Sep 28, 2004 3:17 pm Post subject: Yes, please enlighten us. |
|
|
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 |
|
 |
adaptr Watchman


Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Wed Sep 29, 2004 1:49 pm Post subject: |
|
|
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 |
|
 |
gabe-kai n00b


Joined: 03 Sep 2003 Posts: 63 Location: Michigan, USA
|
Posted: Wed Sep 29, 2004 5:50 pm Post subject: |
|
|
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 |
|
 |
Doc7 Tux's lil' helper


Joined: 18 Jul 2004 Posts: 133 Location: AC-Germany
|
Posted: Thu Sep 30, 2004 8:33 am Post subject: |
|
|
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 |
|
 |
nobspangle Veteran


Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Thu Sep 30, 2004 10:37 am Post subject: |
|
|
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 |
|
 |
chemical chris Tux's lil' helper

Joined: 17 Aug 2004 Posts: 80 Location: l33ds (uk)
|
Posted: Sat Oct 09, 2004 9:41 pm Post subject: |
|
|
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 |
|
 |
chemical chris Tux's lil' helper

Joined: 17 Aug 2004 Posts: 80 Location: l33ds (uk)
|
Posted: Sun Oct 10, 2004 9:28 am Post subject: |
|
|
update:
boath domainname and hostname resolve corectally when the macghene is starting... but still... at login i get newgrange.unknowen_domain |
|
Back to top |
|
 |
nobspangle Veteran


Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Sun Oct 10, 2004 1:42 pm Post subject: |
|
|
have you got
domain domain.tld
at the top of your resolv.conf as I said above? |
|
Back to top |
|
 |
|