Go to the previous, next section.

Advanced Use

How Finger Works

GNU Finger is the collective name for a set of programs:

`finger'
Parses the command line and connects to the finger server, `in.fingerd', on the finger server. Returns the output from the server. finger connects to in.fingerd on the host specified in the command line. This is the only program you need to know anything about if you're a regular user. You should refer to this program as the finger client to avoid possible confusion.

`fingerd'
Regularly connects to in.cfingerd on the clients specified in the `fingerdir/clients' file, to obtain finger data. This client data is saved in the file `fingerdir/userdata'. fingerd should run on the host specified in the `fingerdir/serverhost' file. fingerd should be started at boot time.

`in.fingerd'
Responds to finger connections through inetd. Should be attached to the `finger' service via `/etc/inetd.conf'. in.fingerd behaves somewhat differently depending on what host it runs on: on the server host it reads the `fingerdir/userdata' database, on all other hosts it forwards all requests (unless `.local' is the target) to in.fingerd on the host specified in `fingerdir/serverhost'.

in.fingerd reads the `fingerdir/userdata' database, various system files, and makes SMTP connections to the host specified in the `fingerdir/mailhost' file.

`in.cfingerd'
This is the program that responds to call-ins from fingerd by sampling the status on the client and forwarding it to fingerd. It should be configured to respond to the `cfinger' service specified in the `clients' configuration file, or port 2003 if nothing else is specified.

The `~/.fingerrc' Script

When the GNU Finger server receives a request for information about a user it looks to see if the user has a `.fingerrc' file in the home directory. If such a file exists, and is executable, then this file is executed, and the normal finger output is passed to it as input. Its output becomes what is returned for the request. Thus, it can be used to:

User-defined Targets

Various special targets can be added as executable files in the directory `fingerdir/targets'. Each file name in this directory starts with a letter describing when to execute it, followed by a hyphen and the target name. The three letters are:

`l'
In response to a "long" finger; usually by typing `finger -l'.

`s'
In response to a "short" finger; usually the default if no options are given.

`x'
In response to either a "long" or "short" request.

For instance, the special-target file `x-.help' is run for either `finger .help' or `finger -l .help', whereas the special- target file `l-prices' is run only for `finger -l prices'.

The special-target file is run as super-user, and is given no input. By convention, all GNU Finger sites should support at least:

`.help'
Display message describing what features and special targets exist on this site.

`.site'
Display message describing the site. This may include such things as the company name, its address, and how to contact the system manager.

How Finger Picks a Port

When invoked, the GNU Finger client looks to see if a `--port' option was specified on the command line. If so, then this becomes the port number or service used. Otherwise, the client looks to see what name it was started under, removes any leading directory path, and any trailing suffixes. A suffix is the part of a filename that follows a dot, including the dot itself. This is the service name used. For instance, if GNU Finger is installed as `/usr/local/bin/finger.new', then the service `finger' is used. If it's installed as `/usr/local/bin/gfinger', then the service `gfinger' is used. This behavior can be changed by the system administrator during installation.

Go to the previous, next section.