13

Where can I find a reference to the format of the comment field (field 5) of the /etc/passwd file?

view full story
linux-howto

http://unix.stackexchange.com – In the /etc/passwd file on my system, the "comment" field, field 5, is inconsistent in its contents. I thought that I could extract it to get the full name of the user. fullname=`awk -F: '$1 == name {print $5}' name=$LOGNAME /etc/passwd` However this returns with $fullname containing a name with 0, 3, or 4 commas following. Exploring the man page (man 5 passwd) provides no details of of this field other than describing it as "user name or comment field." Perhaps there is additional information that is stored along with the user name? (HowTos)