How to modify the content of hosts file in Vmin

SYSTEM INFORMATION
OS type and version REQUIRED
Webmin version REQUIRED
Virtualmin version REQUIRED
Related packages SUGGESTED

Dear sirs,

How and where can I modify the contents of my /etc/hosts file in VMIN?

for example, this enumeration:
hostname.domain.com hostname
hostname.domain.com hostname

I modified the host file via command-line, and did a reboot. My server booted but with a lot of failed services: webmin, usermin, etc…even my netplan config was messed up.

As it was on a VM, I was able to login via console and change the host-file content to what it was before…to recover the server.

regards
Tokunbo

1 Like

That’s crazy. What’d you do to your hosts file?

There is nothing special about modifying /etc/hosts in a Virtualmin system. It’s not one of our files and not something we modify the behavior of. We only touch it during install if your system doesn’t even have a fully qualified domain name when the installer is run (we’d rather you got that right before the installation so we don’t have to make any changes).

But, this is either not an /etc/hosts file issue (because Webmin and Usermin do not require anything specific of your hosts file), or you have an additional problem with your configuration…hosts file changes almost certainly cannot cause what you’re describing, even if you do it wrong. (But, maybe I’m wrong. I’ve never really messed up a hosts file in significant ways.)

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.