19

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).

hielsnoppe
  • 293
  • 1
  • 2
  • 7

3 Answers3

33

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

chfn -f "Joe Blow" jblow
Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
14

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

Valentin Bajrami
  • 4,045
  • 1
  • 18
  • 26
4

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

squareborg
  • 592
  • 3
  • 14
  • although, if you are doing that be sure to use `vipw` instead of simply editing the file the usual way – Knoxy May 08 '20 at 00:49