0

Two days ago, I installed Ubuntu 20.04 first time.

I have a slightly damaged keyboard and when I created the user, I typed the email address wrong.

Is there any possibility to change it? Any ideas?

  • 2
    Eh. what email? where did you type it? useradd has "Full Name, Phone, Home-Phone, and Other " Generally your login@host can be used as an email. If "Other" was used: see /etc/passwd but be careful altering that file :) – Rinzwind Aug 13 '22 at 16:54
  • the command line method is chfn – Rinzwind Aug 13 '22 at 17:16
  • email is generally handled in e.g. Thunderbird or any other email client. In other contexts an email-address might be present, and possibly displayed, but usually not used for anything else. – Hannu Aug 14 '22 at 12:35

1 Answers1

0

You need run this command:

sudo usermod -a -G sudo username -c "email@example.com"
Jhosman
  • 101
  • The answer above will also add the user to sudo group. You could do simply usermod username -c "email@example.com". But this will clear the name of the user as well. A cleaner way is to use chfn. – elomage Feb 28 '25 at 15:33