April 2, 2015

tcpdump: bpf_load: genmajor failed: A file or directory in the path name does not exist

If you are getting above error, while trying to run tcpdump via sudo on an AIX host, it's due to environment variable ODMDIR being not set

$env|grep ODMD
ODMDIR=/etc/objrepos
By default sudo will reset your environment and ODMDIR is not avilable in sudo session. Hence commands which require ODMDIR ( ex: cfgmgr, savebase etc) fail.

To resolve this either keep all user environment via 'sudo -E' (or) update sudoers to keep ODMDIR variable (preferred)

Defaults env_keep +="ODMDIR"

No comments:

Post a Comment