Creating a couple of new users on an Ubuntu 16.04 I omitted to enter user full name and now I have several users who on the login screen are seen simply as "Comment". System settings doesn't offer the possibility to change this. How can I fix this? Is it ok to just edit /etc/passwd? Thanks in advance H


I recall I had this problem years back probably on about Ubuntu 14.04 and I installed Users & Groups thinking I would be able to edit the users full name, but found that although you can change every other aspect of the users details you cannot edit the users full name and I found this is simply because the ability for a user to change their own full name is subject to the restrictions in /etc/login.defs. The default configuration is to prevent users from changing their full-name, which makes perfect sense.

To change your own or another user's full name I used the chfn command, this command allows a (normal) user to change all the fields for their own account, subject to the restrictions in /etc/login.defs, or this can be overridden using elevated privileges, by opening a terminal CTR +T while logged in as the user you want to change and running the command:

sudo chfn user

Changing the user information for user
Enter the new value, or press ENTER for the default
Full Name [user]: New Full Name

where user is the user who is logged in and is the user you want to change the full-name for and New Full Name is the new full name for the user. You can use the chfn command to change other account details, but you can change mostly all other details via Users & Groups which can be installed via the Ubuntu Software Center.

Usage: chfn [options] [LOGIN]
  -f, --full-name FULL_NAME     change user's full name
  -h, --home-phone HOME_PHONE   change user's home phone number
  -o, --other OTHER_INFO        change user's other GECOS information
  -r, --room ROOM_NUMBER        change user's room number
  -R, --root CHROOT_DIR         directory to chroot into
  -u, --help                    display this help message and exit
  -w, --work-phone WORK_PHONE   change user's office phone number
      --extrausers              Use the extra users database
| improve this answer | |
  • Dud you had multiple users with the name "Comment" like the OP has? What did you do exactly to fix it? A screenshot or two might be helpful in this situation as well. – WinEunuuchs2Unix Nov 14 '19 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.