Repository navigation
Install fingerd on modern linux
Finger is one of those old cool protocols that have been forgotten. I suggest you read more here. John Carmack of id Software fame used Plan files to tell the world what he was working on at the time. Very cool.
Anyway - Since you can change your .plan file from within Sklaffkom (this now works with both Linux and FreeBSD), it would be cool to allow others to read that Plan file via the Finger command. Example: you can from any "Unix" box (Linux, BSD, MacOS etc) and even Windows 11 enter finger username@host and (if the remote host for some reason has Fingerd running, which is highly unlikely these days) you will get this kind of output back:
me@host# finger joakim@sklaffkom.se
Login: joakim Name: Joakim Melin
Directory: /home/joakim Shell: /bin/bash
No mail.
Plan:
This is my plan.
The Plan file is located in ~/.plan.
As mentioned - Finger is old and more dead than disco. Finger got a bad rep after the Robert Norris worm back in the late 1980s that utilized a bug in fingerd and other Unix system components. The vulnability that enabled denial-of-service attacks in bsd-finger was patched in version 0.16. The latest (last?) version of bsd-finger is 0.17 which is the one this guide is based on. There are plenty of other fingerd implementations to try. Please tell us if you did.
Please note you need to open port TCP/79 to the Internet to allow anyone to check these plans. Also - As demonstrated in our above example, Finger displays information about the user, the shell, login times, etc. If this concerns you, do not enable or open Finger to the Internet.
We have patched the source code for Rocky Linux 10 x64 which means it compiles and installs fine. It also shows everything that Finger is supposed to show, which is not a very good idea if offering Finger access to the entire world.
Instead, you can choose to use what we call "the sanitized version" (source if you want to do a PR) which strips loads of information you don't want to show the rest of the world:
me@host# finger joakim@sklaffkom.se
Login: joakim Name: Joakim Melin
On since Thu Aug 20 09:52 (CEST) on pts/0 from 10.0.2.65
1 minute 32 seconds idle
No mail.
Plan:
This is my plan.
Unpack the archive in /usr/local/src like an intelligent person and then go into the directory and run these commands:
make clean
./configure
make CFLAGS="-O2 -D_DEFAULT_SOURCE -Wno-implicit-function-declaration"
install -m 0755 finger/finger /usr/local/bin/finger
install -m 0755 fingerd/fingerd /usr/local/sbin/fingerd
Create /etc/systemd/system/finger.socket:
[Unit]
Description=Finger Protocol Socket
[Socket]
ListenStream=79
Accept=yes
[Install]
WantedBy=sockets.target
Create the systemd service at /etc/systemd/system/finger@.service:
[Unit]
Description=Finger Server
After=network.target
[Service]
Type=simple
User=fingerd
Group=fingerd
ExecStart=/usr/local/sbin/fingerd
StandardInput=socket
StandardOutput=socket
StandardError=journal
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=no
[Install]
WantedBy=multi-user.target
Run these commands to register and enable the systemd service:
systemctl daemon-reload
systemctl enable --now finger.socket
Check if the service is running by entering systemctl status finger.socket.
Please note that you need to add ACL read permissions to each users home directory and .plan file for fingerd to be able to read it over the network:
setfacl -m u:fingerd:r /home/username/.plan
setfacl -m u:fingerd:--x /home/username
Note: If you are running a local firewall on your Sklaffkom server you need to allow incoming traffic on port TCP/79. If you are running SELinux on your Sklaffkom server you are on your own.
Good luck!
This documentation is provided as-is. It makes no claims beyond "it works for us and it may not work for you".
This documentation may also contain certain attempts at humor and may contain opinions you may or may not agree with. This is a "you" problem, not a "we" problem.
Please adhere to the old rule: read twice, type once. Do not copy commands and configuration data blindly, analyze what it actually means before you try it.
Thanks,
The management.