Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th November 2006, 01:51
FrozenPixel FrozenPixel is offline
Member
 
Join Date: Nov 2006
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default Screwed up Hostname on Ubuntu 6.06 LTS

Ok I not only edited the hostname in:

/etc/host

where I added the IP address: X.X.X.X server1.example.com server1

but also in

/etc/hostname

and this is where I screwed up. Instead of just entering:
server1.example.com

I went -
#server1
server1.example.com

And now I can't get back in to correct the problem, I keep getting
sudo: unable to lookup #server1

Now what should I do, reinstall??

Ubuntu Server 6.06 LTS with LAMP

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 14th November 2006, 15:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Please try the steps shown in chapter 5 on http://www.howtoforge.com/perfect_setup_ubuntu_6.10_p3
__________________
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
  #3  
Old 14th November 2006, 23:03
FrozenPixel FrozenPixel is offline
Member
 
Join Date: Nov 2006
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you Falko. I had tried that but to no avail, having the 2 lines hostname has stopped any type of repair. I even just booted into recovery mode to no avail. I am currently reinstalling the OS and will chalk this up to a learning experience for a beginner Linux user.

I did however rename the hostname because the steps in both the 6.10 and 6.06 version on the HowTo's do not produce the results as stated by issuing the commands:

hostname

hostname -f

as per instructions.

After editing the /etc/host file as instructed those commands did not give identical results so hence the reason I went into /etc/hostname file top begin with.

I also did not use the sudo passwd root but rather just executed the sudo -s as one members comments had suggested.

These HowTo's are the best.

Last edited by FrozenPixel; 14th November 2006 at 23:05.
Reply With Quote
  #4  
Old 15th November 2006, 16:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by FrozenPixel
After editing the /etc/host file as instructed
It's /etc/hosts, not /etc/host.
__________________
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 15th November 2006, 23:44
FrozenPixel FrozenPixel is offline
Member
 
Join Date: Nov 2006
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
It's /etc/hosts, not /etc/host.
Yes you are correct that was just a posting error, not when I actually issued the command.
Reply With Quote
  #6  
Old 16th November 2006, 16:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Ok, what's in /etc/hosts and /etc/hostname, and what's the output of
Code:
hostname
and
Code:
hostname -f
?
__________________
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 17th November 2006, 01:55
FrozenPixel FrozenPixel is offline
Member
 
Join Date: Nov 2006
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Ok prior to editing /etc/hosts

127.0.0.1 localhost
127.0.0.1 myserver1

After editing /etc/hosts

127.0.0.1 localhost.localdomain localhost
192.168.0.1 myserver1.example.com myserver1

Execute after rebooting:

hostname
myserver1

hostname -f
myserver1.example.com

Prior to editing /etc/hostname
myserver1

After editing:
myserver1.example.com

Now issuing both commands matches each result.
myserver1.example.com

Last edited by FrozenPixel; 17th November 2006 at 01:57.
Reply With Quote
  #8  
Old 17th November 2006, 15:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by FrozenPixel
Now issuing both commands matches each result.
myserver1.example.com
So the problem is solved?
__________________
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
  #9  
Old 18th November 2006, 20:45
FrozenPixel FrozenPixel is offline
Member
 
Join Date: Nov 2006
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by falko
So the problem is solved?

Yes it is thank you.
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
Hostname problem in TPS Ubuntu 6.06 zicoz HOWTO-Related Questions 2 17th September 2006 16:12
Help with The Perfect Setup - Ubuntu 6.06 LTS Server LinuxNewb HOWTO-Related Questions 6 30th July 2006 13:43
How To Set Up Xen 3.0 From Binaries In Ubuntu 6.06 LTS (Dapper Drake) dspott HOWTO-Related Questions 3 30th June 2006 09:30
Hostname problems Ubuntu 6.06 setup badgerbox76 Installation/Configuration 1 13th June 2006 07:59
Request: Perfect Ubuntu 6.06 LTS - Automatic LAMP Server Installation (co-location) Anim Suggest HOWTO 19 6th June 2006 11:30


All times are GMT +2. The time now is 14:35.


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