When I did a fresh install of UM20.04, you are prompted for a name and a username to be used. So I later wanted to change the name, went to System/Administration/Users and Groups and made the change. However, when you look at network shares, it still shows the name originally entered during the installation. I am not sure if there are other locations yet. Is there a way to change the displayed name?
sudo usermod -c "Some New Name" username
you can see the change in grep username /etc/passwd
(the 5th field)
Thanks but that did not work. (I did reboot after the change)
robert@rob-UM20:~$ grep robert /etc/passwd
robert:x:1000:1000:robert,,,,:/home/robert:/bin/bash
robert@rob-UM20:~$ sudo usermod -c "robert" robert
[sudo] password for robert:
robert@rob-UM20:~$
So how would I change the name "rob"
My username is user. This is what I did on um20
user@um20:~$ grep user /etc/passwd
user:x:1000:1000:user:/home/user:/bin/bash
user@um20:~$ sudo usermod -c "robert" user
user@um20:~$ grep user /etc/passwd
user:x:1000:1000:robert:/home/user:/bin/bash
You should have typed sudo usermod -c "rob" robert
Your hostname is rob-UM20.
Thanks again. However, I still did not have any success with the usermod command. But you did make me realize my host name is a combination of my name and my machine name entered during the installation. So I just changed my host name in the /etc/hosts file and used the following command:
sudo hostnamectl set-hostname "my new host name"
Now my host name is very short, better than what I set out to do. All seems to work well so far.
You should change your hostname in two places 1) /etc/hosts and 2) /etc/hostname
It seems during install, UM suggested hostname as rob-um20. I try not to use hyphen in the name, um20 seems reasonable. After reboot, it will reflect the new hostname. If you dont modify both files, sudo may have issues. You can research this topic.
I just checked the /etc/hostname file and it was correct. No changes were needed.
Yes, I did end up using UM20 for a host name. Maybe I missed it during installation, but picking your own hostname during the installation process would have been nice. However, it was easy to change once I knew how. Thanks again for your help.
You did miss it during installation. I have never done an installation that it was not there. The installation media always puts in a name though, like HP-Pav-203 for a HP Pavilion computer. Don't feel bad though, it took me a few installations to check the box to not ask for login but allow auto login on start up. We as people have a tendency to not pay close attention to a lot of things. I learned to slow down and pay more attention.
So I just did another installation, at no point did I have the option to choose a host name. I did have the option for my own name and machine name. I left my name blank for this installation.
your computer's name (second field) is the hostname.
The installation puts a name in based on information it can read from your computer, but it is possible to change it. I always change the computer name/ host name myself.
Jim, I was replying to @jaybo
Understand, but my first installation the domain ended up being a combination of "Your name" and "Your computer's name". That is why I left my name blank on the second installation.