Within our corporate network, when I run finger
(no arguments) from a client machine, I am presented a list of users with names and the like. But when I run finger @localhost
I get "Connection refused". So where does finger connect to by default?
Linux – Where does finger connect to by default
defaultslinux
Best Answer
According to
strace finger
, on my system it gets the list of current users fromand details about each one by
stat
ing the ptywhen run without arguments. When you run it with
@localhost
, it tries to use thefingerd
daemon, and since it's not 1993 any more, that's not running - hence theconnection refused
.Edit when run with an argument which is a
user
, rather than@remote-system
, it gets the information from the GECOS field in/etc/passwd
and the home directory (for files like~/.plan
). It doesn't have privilege, so users will need home directories and plan files you can read in order to display e.g. the plan file. Here (also fromstrace
) you see it both trying, and failing, to open some of these files in another user's directory, which is mode 750 (and I'm not in her group):