[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: localhost in /etc/hosts



On Wed, Nov 22, 2006 at 12:17:03AM +0100, Vincent Lefevre wrote:

> Well, the result of the hostname command depends on the /etc/hosts
> file and if your configuration is incorrect, it may not give you a
> consistent result.
 
Not here.  It uses the /etc/hostname file.  I changed the entry in 
/etc/hostname to "jim", rebooted, and was greeted with 

jim login:

The "hostname" command gave me "jim".

On the other hand, I changed the /etc/hosts entry to 

127.0.0.1  tom dick harry quash localhost loopback

to see what would happen.  It had no effect on "hostname".  The only 
problem I've had so far is that exim uses the first name ("tom") to 
add to local users' addresses, ie, <user> is expanded to <user>@tom, 
screwing up the rewriting rules, which were set to rewrite 
<user>@quash.

I'm waiting to see other side-effects...

Cheers,
David

-- 
David Jardine

"Running Debian GNU/Linux and
loving every minute of it."  -L. von Sacher-M.(1835-1895)



Reply to: