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).
The GECOS field in /etc/password
can be modified with the chfn(1)
command.
chfn -f "Joe Blow" jblow
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
You can edit /etc/passwd
directly the full name a field in this file.
-
although, if you are doing that be sure to use
vipw
instead of simply editing the file the usual way – Knoxy May 8 '20 at 0:49