in the file /etc/passwd we have the so called GECOS fields (which stands for "General Electric Comprehensive Operating System"), that is:
username:password:userid:groupid:gecos:home-dir:shell
Where GECOS are divided as:
:FullName,RoomAddress,WorkPhone,HomePhone,Others:
And Others are divided in as many commas as you like:
:FullName,RoomAddress,WorkPhone,HomePhone,Other1,Other2,Other3:
In the man chfn pages one can read:
The other field is used to store accounting information used by other applications.
Now, for an application developer (I'm interested in C language, system calls and/or bash script) which is the best way to grab this information?
And considering just the Bash environment, given that finger command cannot display the others fields (or at least I don't see how), what are other commands that can? I know that chfn not only show, but allow them to be changed. What if one is to just output it to stdout?