Nmap Support Files
In addition to the nmap executable, there are six support files that provide nmap with additional information during a scan. These files are nmap-mac-prefixes, nmap-os-fingerprints, nmap-protocols, nmap-rpc, nmap-service-probes, and nmap-services.


Most nmap scans will work properly without these files, but the information provided during the scan will be limited if the files aren't available. Other scans options, such as the operating system fingerprinting option (-O), requires the nmap-os-fingerprints file or the scan will halt with this error:

OS scan requested but I cannot find nmap-os-fingerprints file. It should be in /usr/local/share/nmap, ~/.nmap, or .
QUITTING!



Locating the Support Files
To locate the support files, nmap searches through the file system in this order:

  1. A data directory can be specified on the nmap command line with the --datadir option. All of the support files should be located in this single directory.


  2. An environment variable called NMAPDIR can reference the directory containing the support files. This environment variable can be configured in a login profile or using the operating system's set command.


  3. The real and effective user ID (on POSIX systems) home directory or the location of the nmap executable (on Windows-based systems) is another optional location for the support files. On POSIX systems, the home directory is referenced with a tilde (~), and the files are expected to be in the ~/nmap directory.


  4. The support files can also be stored in the directory where nmap was installed or compiled. This directory is usually /usr/local/share/nmap or /user/share/nmap.


  5. Finally, the current directory is checked for the support files.