Results 1 to 7 of 7
Hi everyone,
I have installed redhat on the vmware and i have installed all the rpms using the GUI. But when i try running TCPDUMP command it says" Command not ...
- 07-27-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 6
Not able to run TCPDUMP even though it is installed
Hi everyone,
I have installed redhat on the vmware and i have installed all the rpms using the GUI. But when i try running TCPDUMP command it says" Command not found".
I am able to locate it and when i query for it using the command "rpm -q tcpdump" it shows tcpdump-3.7.2-1. This means tcpdump command is installed but when i run "sudo tcpdump" it says" command not found". Please help me in this regard. Thanks in advance.
- 07-27-2009 #2
tcpdump is not in your $PATH, only in root´s $PATH.
So it is not enough to have root privileges (which you get via sudo).
You could become root:
sudo su -
and then execute
tcpdump
Or you can enter the pathname:
sudo /usr/sbin/tcpdump
- 07-27-2009 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 6
Thanks a lot. "sudo /usr/sbin/tcpdump" worked..
But the first one
"You could become root:
sudo su -
and then execute
tcpdump"
this didnt work. It again said "command not found". If u can tell me the reason for this it would be great. Anyways thank you..
- 07-27-2009 #4
/usr/sbin should be in $PATH, after you become root.
Please do it again
sudo su -
(note the - )
and then
echo $PATH
There should be "/sbin" and "/usr/sbin" among them
- 07-27-2009 #5Just Joined!
- Join Date
- Jul 2009
- Posts
- 6
I tried executing with "sudo su -" but it says"bumblebee is not in the sudoers file. This incident will be reported".
- 07-27-2009 #6
This leaves the scope of the original question, but ok

sudo on your computer is configured in a way that it does allow you to execute tcpdump with root privileges.
But the environment is still that of the user bumblebee.
To see it, type: env
You will notice, that your $PATH does not have (or better: not need) /sbin and /usr/sbin
This is why "sudo tcpdump" returns a file not found error.
sudo /usr/sbin/tcpdump works, because you explicitly tell where to look for tcpdump
As for the "bumblebee is not in the sudoers file. This incident will be reported". message.
That means, you are not allowed to use the programm su with sudo.
This is defined in /etc/sudoers
As you no doubt have figured out by now:
sudo is used to give normal users access to _some_ privileged programs, without giving the root password to everyone.
(in theory all programs, but that would be against security and good practice)
Further info:
man sudo
- 07-28-2009 #7Just Joined!
- Join Date
- Jul 2009
- Posts
- 6
Thanks a lot for the info..


Reply With Quote