Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] hostname --fqdn => Host name lookup failure
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
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 185

PostPosted: Sat Jan 12, 2008 10:00 pm    Post subject: [solved] hostname --fqdn => Host name lookup failure Reply with quote

Regardless of which custom host name I write into /etc/conf.d/hostname, this is the result:
Code:
hostname --fqdn
hostname: Host name lookupfailure

I even tried "local" as host name. Solely for "localhost" as host name, hostname gives:
Code:
hostname --fqdn
hostname


Neither the Gentoo Linux x86 Handbook
nor
Code:
man hostname

gives me a clue what a valid hostname may look like. Any hints?


Last edited by Yminus on Thu Jan 17, 2008 7:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
Old School
Apprentice
Apprentice


Joined: 20 Nov 2004
Posts: 252
Location: West Bank of the Coast Fork

PostPosted: Sat Jan 12, 2008 10:14 pm    Post subject: Reply with quote

Code:
# /etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME="badboy"

I hope that helps.
_________________
www.otw20.com

The further a society drifts from truth, the more it will hate those who speak it.
George Orwell
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 614
Location: Munich, Germany

PostPosted: Sat Jan 12, 2008 10:50 pm    Post subject: Reply with quote

Your /etc/hosts is missing an entry for your hostname ;)

/etc/conf.d/hostname wrote:
HOSTNAME="mycomputer"


/etc/hosts wrote:
127.0.0.1 mycomputer.mydomain.local mycomputer


after setting these settings you'll get:

Code:
$ hostname
mycomputer
$ hostname --fqdn
mycomputer.mydomain.local

_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 185

PostPosted: Sat Jan 12, 2008 11:25 pm    Post subject: Reply with quote

Thanks, this solved the problem!
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Sun Jan 13, 2008 1:38 am    Post subject: Reply with quote

blu3bird wrote:
Your /etc/hosts is missing an entry for your hostname ;)

/etc/hosts wrote:
127.0.0.1 mycomputer.mydomain.local mycomputer




"localhost localhost.localdomain" should still remain on that line as well...

cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
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