Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd June 2007, 18:13
mcroteau105 mcroteau105 is offline
Junior Member
 
Join Date: May 2007
Location: Reno
Posts: 17
Thanks: 3
Thanked 2 Times in 1 Post
Default Problems with hostname & hostname -f not the same

I have went through the installation of Ubuntu twice now trying to get my hosts table to play nicely. But for some reason, my hostname and hostname -f are not yeilding the same values. Does anyone have any ideas on this? Thanks in advance.

hostname yields ---> server

hostname -f yields ---> server.example.com

Mike
Reply With Quote
Sponsored Links
  #2  
Old 22nd June 2007, 18:54
mcroteau105 mcroteau105 is offline
Junior Member
 
Join Date: May 2007
Location: Reno
Posts: 17
Thanks: 3
Thanked 2 Times in 1 Post
Default Thank you Till

I took this from another forum post... it worked like magic! Thanks Till --

To set the hostname of your server, execute these two commands:

echo server1.example.com > /etc/hostname

/bin/hostname -F /etc/hostname

"server1.example.com" must be replaced with your hostname
__________________
Till Brehm
--
http://www.projektfarm.com/en/
Reply With Quote
  #3  
Old 28th June 2007, 16:19
Ripper Ripper is offline
Junior Member
 
Join Date: Jun 2007
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Default hostname: Unknown host

I initially tested the hostname and hostname -f commands and discovered the results were different. Experiencing problems in other areas, I reasoned this could have an impact on those troubles. So, I followed and executed the instructions above:

***********
To set the hostname of your server, execute these two commands:

echo server1.example.com > /etc/hostname

/bin/hostname -F /etc/hostname

"server1.example.com" must be replaced with your hostname
***********

hostname comes back correct, but hostname -f results in:

root@ripper:/etc/bind# hostname -f
hostname: Unknown host

Anyone know why?

Thanks,
Ripper

Last edited by Ripper; 28th June 2007 at 16:21. Reason: revise title for easier search
Reply With Quote
  #4  
Old 29th June 2007, 18:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Try to reboot the system.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 19th August 2007, 23:57
cafeelgood cafeelgood is offline
Junior Member
 
Join Date: Aug 2007
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
Default

I'm having the same problem, I am getting this:

root@server:~# hostname -f
hostname: Unknown host


Anyone have another idea? (already tried to reboot).

Here is my /etc/hosts

127.0.0.1 localhost.localdomain localhost
10.0.4.10 serveur.******.**** serveur

# The following lines are desirable for IPv6 capable hosts
::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

Reply With Quote
  #6  
Old 20th August 2007, 19:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Please put your desired hostname into /etc/hostname and reboot the system.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 20th August 2007, 21:16
cafeelgood cafeelgood is offline
Junior Member
 
Join Date: Aug 2007
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Already done with

echo serveur.*******.info > /etc/hostname

After verifications, everything is there, but still nothing.

This is a clean install so i don't understant the reason of such a thing. I am using this tuto http://www.howtoforge.com/perfect_setup_ubuntu704_p3 .

Thanks for your reply.
Reply With Quote
  #8  
Old 21st August 2007, 02:25
cafeelgood cafeelgood is offline
Junior Member
 
Join Date: Aug 2007
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default

I will answer myself but viewing my post... i was writing serveur (which is in french) instead of server like the real name of the machine.

I was using both idiomas, but should only use english when naming a machine... doh.

Sorry for writing this non-problem!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing A LAMP System With Fedora Core 6 - Page 4 LAEAGLE HOWTO-Related Questions 11 24th February 2007 14:59
Changing servers hostname rbartz Installation/Configuration 3 16th September 2006 13:54
Hostname problems Ubuntu 6.06 setup badgerbox76 Installation/Configuration 1 13th June 2006 07:59
email hostname problems sushestvo Installation/Configuration 9 26th May 2006 16:31
Empty Recycle Bin jon335 General 40 6th May 2006 11:56


All times are GMT +2. The time now is 18:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.