Solved

hosts file error

Posted on 2000-04-22
4
214 Views
Last Modified: 2013-12-06
If I do a fresh install of RH 6.1 the hosts file ends up being one line that looks like this:
127.0.0.1            localhost.localdomain localhost php1@softdesigns.com

I have to edit it to look like this:
127.0.0.1            localhost.localdomain localhost
192.168.1.10            php1@softdesigns.com php1

I entered the 192.168.1.10 address during the install process. I entered php1@softdesigns.com as the host name during the install process.
What could I have done wrong during the install that would make rh 6.1 create an invalid hosts file. Or is the one line host file valid in some sence of the word.
Is this a bug or a normal administration chore?

0
Comment
Question by:davidpm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:zx9r
ID: 2740514
the problem is in the character @

if the domain name is softdesigns.com then the host name would be php1.softdesigns.com and not php1@softdesigns.com

Anyway the installation program would must check this error... perhaps in future versions ?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 25 total points
ID: 2740879
As zx9r pointed out the @ sign can't be there. Redhat's installation is at odds with their own reference manual and at odds with standard Unix conventions.

According to the "Official Red Hat Linux Reference Guide" pp109-111, the linuxconf settings should have localhost.localdomain and the FQDN for the system separately defined. When done this way the hosts file will contain:

127.0.0.1      localhost.localdomain
111.222.333.444 name.dom.com

You'd normally add aliases of localhost and name to the respective lines, just to make life a bit simpler. That section is very specific about leaving localhost.localdomain defined.

For some bizare reason the OS installer does it the way you've noticed. And that tends to break things that need the IP of the local box. So Ijust let install do its thing and when it's finished I do my thing and make the hosts file look like it should.
0
 

Author Comment

by:davidpm
ID: 2741373
Adjusted points from 10 to 25
0
 

Author Comment

by:davidpm
ID: 2741374
I'll to to cs to ask zx9r to get his points to as he was first. jevie is and has been working on several major projects and has the most complete answer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question