Summary: | Unknown hostname | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michal Margula <alchemyx> |
Component: | [OLD] Core system | Assignee: | Docs Team <docs-team> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | clock, floeff |
Priority: | High | ||
Version: | 2004.2 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Michal Margula
2004-09-10 02:53:44 UTC
Sorry, correction: Command "domainname" shows empty and in login issue file you can see "hostname.(none)" where in place of "(none)" should be our domain name. hostname works off of input in /etc/hostname domainname is for NIS/YP not DNS dnsdomainname works off of the input from /etc/hostname and requires that the hostname be FQDN and resolvable (via the resolver library ... that means the nameservers in /etc/resolv.conf or the settings in /etc/hosts must provide the info) for more info, see `man hostname` I am afraid that you are not right. First thing - Gentoo Installation Handbook states clearly that you need to put your hostname (there is nothing about FQDN!!!) into /etc/hostname and your domain name into /etc/dnsdomainname Second thing - if you even put FQDN into /etc/hostname issue shows then "FQDN.host.name.(none)" so it is still WRONG. And by the way: bash-2.05b$ cat /etc/dnsdomainname uznam.net.pl bash-2.05b$ dnsdomainname bash-2.05b$ cat /etc/hostname cerber bash-2.05b$ hostname cerber And yes - my hostname is resolvable via DNS servers and also it is put in /etc/hosts to be completly sure. Let's straighten this one out, shall we? /etc/hostname should contain your hostname, nothing else, not a FQDN. From our own /etc/init.d/hostname """ # We use whatever is in /etc/hostname here. That means: # # 1) For doing it the proper way, you should NOT put a # FQDN in there, but: # a) Only have the hostname in there (no dns/nis domainname) # b) Set the dnsdomainname via /etc/resolv.conf # c) Set the nisdomainname via 'domainname'. # # 2) If the user want a FQDN in there, it should be possible # without hacking things to pieces, but then he should # know what he is doing ... # """ You could define your domain name in /etc/dnsdomainname and add domainname to your runlevel, but all this does is rewrite the domain line in your /etc/resolv.conv at every boot. In short, host name goes into /etc/hostname domain name goes into /etc/resolv.conf e.g. neysx@basil ~ $ cat /etc/resolv.conf domain a.la.maison nameserver 10.0.0.1 neysx@basil ~ $ cat /etc/hostname basil neysx@basil ~ $ cat /etc/hosts 127.0.0.1 localhost 10.0.0.2 basil.a.la.maison basil 10.0.0.123 moose.a.la.maison moose neysx@basil ~ $ hostname basil neysx@basil ~ $ hostname -f basil.a.la.maison neysx@basil ~ $ dnsdomainname a.la.maison Hth I have everything configured the same way, except one thing, I had: my.ip.addr.ess cerber cerber.uznam.net.pl after reversing it to: my.ip.addr.ess cerber.uznam.net.pl cerber Everything went trough without problems. I am wondering if it is worth mentioning in Gentoo handbook? If not, please close that bug and forget about it. Thanks. /etc/hosts wants your.ip.add.ress canonical_hostname alias(es) just like in the above sample, just like you've done, just like in the handbook. If you get (none) from your /etc/issue, check that you're not using \o (lowercase letter O) which is for nis domains, use \O instead (uppercase letter O) Available escapes are documented in `man agetty` *** Bug 53803 has been marked as a duplicate of this bug. *** *** Bug 104866 has been marked as a duplicate of this bug. *** |