Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1007  / 1 Year ago, wed, november 16, 2022, 8:25:40

If you add a user using useradd you get asked to supply some other information about the user (Full name, room number, work phone etc).



Where exactly is this information being stored?
How do you access this information?
How do you edit this information?


More From » useradd

 Answers
4

These are GECOS data, and are stored in /etc/passwd, in the fifth field as a set of comma-separated values:



$ getent passwd pulse
pulse:x:115:122:PulseAudio daemon,,,:/var/run/pulse:/bin/false


They can be modified using the chfn command (preferably), or the usermod command.



I don't know if there are utilities to get a particular field directly, but you can parse the output of getent passwd or finger.


[#21863] Friday, November 18, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ouschee

Total Points: 485
Total Questions: 88
Total Answers: 106

Location: Central African Republic
Member since Mon, Aug 10, 2020
4 Years ago
;