Andrew Bryant's picture

I'm trying to change the hostname of a LAMP Turnkey instance and once it's rebooted, the hostname is '(none)' (and is detected by third-party clients as such).

Any clues why?

Andrew Bryant's picture

Is there honestly no answer to this issue?

Jeremy Davis's picture

But if you update /etc/hostname and /etc/hosts with the new name and then restart your networking (or just reboot).

Andrew Bryant's picture

You can do it in Webmin by navigating to Network > Network Configuration > Hostname & DNS Client.

Incidentally, it does seem it's a bug in both Webmin and Debian/Linux - my chosen hostname had an underscore in it (illegal character) but the system (either Webmin or the actual kernal) doesn't *stop* you using it. It just fails to apply the hostname, setting it to (none).

Changed the _ to - (as per here) and it's all peachy.

philip.daniels1971's picture

Hmm. I have also just run into this. Downloaded the fileserver appliance, installed it ok, set a static IP, changed the hostname and rebooted. /etc/hosts and /etc/hostname both show the new name which is "meterbox" so there should not be any problems with special characters.

My network's DNS is handled by my router running dd-wrt, and has been rebooted.

Yet the tkl box is still known on the network as "fileserver", the out-of-the-box name. Strange.

Jeremy Davis's picture

If so you'll also need to set it there. Or perhaps it's just been cached somewhere?

I have a DNS server running on my netwrok and just configured my desired hostname there and http(s) works as expected.

philip.daniels1971's picture

Sorry for not getting back earlier on this. Had a chance to look at it yesterday and you were right. I noticed that the VM was showing up in DD-WRT with a hostname of "*". So I copied the MAC address from that client and setup a static lease in DD-WRT for my desired IP & hostname and it all works.

I was initially thrown by the fact that I don't have to do this for Windows-based VMs, they are all pingable by name though it appears that their hostnames don't show up in DD-WRT either. Probably a NetBios thing (if that still exists!).

Add new comment