hostname without dot and after

7 posts / 0 new
Last post
#1 Wed, 05/13/2009 - 03:51
reQuorter

hostname without dot and after

Hello,

When I set in Virtualmin -> Webmin -> Networking -> Network Configuration -> Hostname and DNS Client, Hostname name with dot and something after, it won't showup in box after saving it.

ex. I set example.com it will only shows example (without dot and after).

but in Virtualmin's System Information, System hostname is providing name right, with dot (example.com).

Wed, 05/13/2009 - 07:39
Joe
Joe's picture

Does your hosts file have something funny going on? (What's in /etc/hosts?)

--

Check out the forum guidelines!

Wed, 05/13/2009 - 08:18 (Reply to #2)
reQuorter

OS: Debian 5.0 Lenny

/etc/hosts:
[code:1]127.0.0.1 localhost
127.0.1.1 example.com

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts[/code:1]

Wed, 05/13/2009 - 08:26 (Reply to #3)
Joe
Joe's picture

So this is a little bit funny: "127.0.1.1 example.com"

What do you get from the following two commands:

hostname

hostname -f

You probably actually want a real IP address, rather than a loopback, and you also want two names on the example.com line. For example:

70.86.4.238 virtualmin.com virtualmin

This explains the display weirdness.

As for the 127.0.1.1 thing, Debian/Ubuntu have started doing this to deal with a reality of mostly dynamic IP addresses...but it's a funky solution to the problem, with some odd side effects. Anyway, in a server, you want a regular static IP (even if it's just a private one, like 192.168.1.1) and not a second lo address.

--

Check out the forum guidelines!

Wed, 05/13/2009 - 08:49 (Reply to #4)
reQuorter

My server's IP is static.
I have changed my <i>/etc/hosts/</i> with:
[code:1]192.168.0.1 example-domain.com example-domain[/code:1]
but problem still remains (hostname without dot and after in panel).
When I type <i>hostname</i>, it's the same like <i>hostname -f</i>, and it just shows <i>example-domain.com</i>.
My domain is with dash in name, maybe it's the problem?

Wed, 05/13/2009 - 09:09 (Reply to #5)
reQuorter

I show you the rest of hostname commands:
<i>uname -n</i> -&gt; example-domain.com
<i>hostname -a</i> -&gt; example-domain
<i>hostname -s</i> -&gt; example-domain
<i>hostname -d</i> -&gt; com
<i>hostname -f</i> -&gt; example-domain.com
<i>hostname</i> -&gt; example-domain.com

Wed, 05/13/2009 - 09:52 (Reply to #6)
Joe
Joe's picture

This is actually a bug in Webmin 1.480 - on that Hostname and DNS Client page, it always shows the short hostname. However, it will save whatever fully-qualified hostname you enter.

This will be fixed in Webmin 1.490.

--

Check out the forum guidelines!

Topic locked