C.0 Configuring NMAP for ZENworks

The following sections lets you know how to configure NMAP for ZENworks:

Configuring NMAP for ZENworks on Linux

Network discovery is done by the ZENloader module, which runs with zenworks as the username, and the nmap command with the -O option. However, the nmap command needs root privileges to successfully execute. Consequently, the NMAP discovery fails when it runs with the zenworks username. You should not run ZENloader with the root username. To resolve this issue, the zenworks user must be enabled to run NMAP for discovery with root privilege by configuring NMAP for ZENworks.

To configure NMAP for ZENworks, do the following on the Linux Primary Server:

  1. Log in as root.

  2. Enter the visudo command to open the sudo user configuration file in the vi editor.

    HINT:When you open the sudo configuration file in the vi editor, the editor also validates the file to ensure that correct syntax is used.

  3. Comment the following lines by typing # at the beginning of the lines:

    Defaults targetpw    # ask for the password of the target user i.e. root
    
    ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
    
  4. Add zenworks ALL=(ALL) NOPASSWD:/usr/bin/nmap after the following lines:

    # User privilege specification
    
      root    ALL=(ALL) ALL
    
  5. Save your changes and exit the editor.

Configuring NMAP for ZENworks on Windows

On a Windows Primary Server, the NMAP (nmap.exe) is installed in the %ProgramFiles%\nmap directory and added to the PATH variable of the user who installs it. While installing NMAP, PATH variable is added only to the user variable. You have to manually add it to system environment variable.

You must append the location of the NMAP installation directory (%ProgramFiles%\nmap) to the system environment variable PATH of Windows.