140 Chapter 6 ■ Enumeration of Services
Unix and Linux commands are case sensitive in most situations, so when
entering a command pay close attention to the letter case.
finger
The finger command is designed to return information about a user on a given system.
When executed it returns information such as the user’s home directory, login time, idle
times, office location, and the last time they both received or read mail.
The command line for the finger command looks like this:
finger <switches> username
Switches that can be used with the finger command include the following:
■ -b removes the home directory and shell from the user display.
■ -f removes header information from the display.
■ -w removes the full name from the display.
■ -l returns the list of users.
rpcinfo
The rpcinfo command enumerates information exposed over the Remote Procedure Call
(RPC) protocol.
The command line for rpcinfo looks like this:
rpcinfo <switches> hostname
Switches that can be used with rpcinfo include the following:
■ -m displays a list of statistics for RPC on a given host.
■ -s displays a list of registered RPC applications on a given host.
showmount
The showmount command lists and identifies the shared directories present on a given sys-
tem. showmount displays a list of all clients that have remotely mounted a file system.
The command line for showmount looks like this:
/usr/sbin/showmount [- ade ] [hostname]
Switches that can be used with showmount include the following:
■ -a prints all remote mounts.
■ -d lists directories that have been remotely mounted by clients.
■ -e prints the list of shared file systems.