Finger command not showing Office, Office Phone from /etc/passwd

Not sure if this is the best place to post, but at this point my question seems to be an advanced topic.

I'm curious why it is that the "office phone" column of finger does not seem to report anything even when data is entered in the GECOS field of /etc/passwd. I am using Ubuntu 8.10, kernel 2.6.27-11, finger version 'bsd-finger-0.17' compiled from source (available at http://us.archive.ubuntu.com/ubuntu/.../b/bsd-finger/). To the best of my knowledge, this is also the version of finger that ships with Ubuntu 8.10.

For a theoretical user:

User jpublic's entry from /etc/passwd:

jpublic:x:1000:1000:John,101,9999,555-1234:/home/jpublic:/bin/bash 

Result of "finger" with no arguments:

 Code:
jpublic> finger
Login     Name       Tty      Idle  Login Time   Office     Office Phone
jpublic   John      *pts/0          Oct  9 18:02 (localhost) 

Result of "finger jpublic":

jpublic> finger jpublic
Login: jpublic                    Name: John
Directory: /home/jpublic                Shell: /bin/bash
Office: 101, x9999            Home Phone: 555-1234
On since Fri Oct  9 18:02 (EDT) on pts/0 from localhost (messages off)
No mail.
No Plan. 

Comparing the output of 'finger' with 'finger jpublic', there are a couple differences which interest me:

  1. The Office Phone shows in 'finger public', and not in 'finger' with no arguments.

  2. The Office column in the 'finger' command shows where the user is logged in from (in this example, I had used telnet to connect to localhost). The Office entry in the 'finger jpublic' command displays sections 2 and 3 of the GECOS field in /etc/passwd.

I have attempted to follow through the source code of bsd-finger-0.17, but have made a poor job of it as I am not very c-savvy. There was a commented warning about how some gecos information may not display properly from distribution to distribution, but another part of code seems to clearly extract four sections out of the gecos field (function starting on line 83 of util.c). Even so, I'm not sure if this is intended to be used in the output of the command when it has no parameters ('finger') or rather when it has a username passed as a parameter (e.g., 'finger jpublic').

Here is the comment from finger.c:

* Finger prints out information about users.  It is not portable since
 * certain fields (e.g. the full user name, office, and phone numbers) are
 * extracted from the gecos field of the passwd file which other UNIXes
 * may not have or may use for other things. (This is not really true any
 * more, btw.)

Could this comment be applicable? Being a BSD version of finger, would there be some Ubuntu/Debian specific change necessary to have the office phone show up properly?

Am I just doing something wrong?

Thanks for the help.

I resolved this problem to my satisfaction. For others interested, see this thread:

Finger command not showing office phone from /etc/passwd - LinuxQuestions.org