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 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?
dbus:x:81:81:System message bus:/:/bin/false. I think the comments associated to a user account when created withuseraddoradduseris put here. But I mean, who does that? – htor Jan 7 '12 at 22:02