14

I'm working on a Debian server as an inexperienced admin. I need to change the full name of a user (not the login name) provided during adduser USERNAME. How can I do this? I didn't find such an option in usermod (http://linuxcommand.org/man_pages/usermod8.html).

24

The GECOS field in /etc/password can be modified with the chfn(1) command.

chfn -f "Joe Blow" jblow
  • This also works on RHEL / CentOS. – Fer García Jan 7 at 21:11
7

You can do the following

adduser username -c "John Snow" -s /bin/bash

modify

usermod -c "Snow John" username

To verify users' full name finger username

4

You can edit /etc/passwd directly the full name a field in this file.

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.