Short version
Can I just edit the /etc/hosts
file, meaning can I login as user@<hostname I wish to change>
without unintentionally breaking something? Would this be enough or is there something else to do?
Long version
I'm trying to create an Ubuntu 16 guest OS in VirtualBox on a Windows 10 host. I have downloaded the Ubuntu 16 .vdi
from oxboxes.org, but I don't like the fact that I have to login as osboxes@osboxes
. Ultimately I want to login as ab@ab
.
First I changed the user name using usermod
as described here in @ValentinUveges answer. This worked and so I can now at least login as ab@osboxes
. To change @osboxes
to @ab
I have tried groupmod -n ab osboxes
, but this failed.
But at least I think what I really need to change is the /etc/hosts
file, which currently contains
cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 osboxes
So can I just edit /etc/hosts
and change osboxes
to ab
in order to allow me to login as ab@ab
without unintentionally breaking some parts of the OS? Would this be enough or is there something else to do?
Apart from the steps I mentioned before, this is a "fresh" osboxes.vdi
virtual operating system file.