IBM Support

sudo nmap called from StackSensor not working

Troubleshooting


Problem

Certain new versions of sudo may not work without a flag

Symptom

sudo nmap -T Normal -O -sS -oX - <ipaddress>/32
<verbose level="0"/>

<debugging level="0"/>

pcap_open_live(en1, 100, 0, 200) FAILED. Reported error: bpf_load:
genmajor failed: No such file or directory. Will wait 5 seconds then
retry.

pcap_open_live(en1, 100, 0, 200) FAILED. Reported error: bpf_load:
genmajor failed: No such file or directory. Will wait 25 seconds then
retry.

Call to pcap_open_live(en1, 100, 0, 200) failed three times. Reported
error: bpf_load: genmajor failed: No such file or directory

Cause

Environment is not passed to the command to be executed.

Resolving The Problem

In newer versions of sudo (for example, Sudo version 1.7.2p5) a new flag is available

The -E (preserve environment) option will override the env_reset option in sudoers(5)).


It is only available when either the matching command has the SETENV tag or the setenv option is set in sudoers(5).
.
Add an alias in the user .profile like:

sudo="sudo -E"

Then run the discovery.

[{"Product":{"code":"SSPLFC","label":"Tivoli Application Dependency Discovery Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"}],"Version":"7.2.1;7.2.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

TADDM

Document Information

Modified date:
17 June 2018

UID

swg21690912