![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MS Office for Linux.. | aman_mlt | Linux | 2 | 03-22-2006 08:18 AM |
| Office | vikster007 | UNIX for Dummies Questions & Answers | 2 | 06-25-2005 10:12 AM |
| Office tool for HP-UX 11.0 ? | prasanna | HP-UX | 3 | 12-14-2001 01:12 AM |
| mailx - out of the office | bigfish | UNIX for Dummies Questions & Answers | 3 | 11-30-2001 03:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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: Code:
jpublic:x:1000:1000:John,101,9999,555-1234:/home/jpublic:/bin/bash Result of "finger" with no arguments: Code: 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": Code:
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: Code:
* 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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|