Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I try to install Hping3 in my ubuntu 8.04 but after installation when I want to Hping3 I got this error:

Command 'hping3' is available in '/usr/sbin/hping3' The command could not be located because '/usr/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative priviledges associated with your user account.

also when I try to run ifconfig I get this:

Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative priviledges associated with your user account.

first it needs to run sudo su and then run the command. is it normal? or I miss something?

when I run echo $PATH I get:

/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/amirreza/simulator/ns-allinone-2.33/bin:/home/amirreza/simulator/ns-allinone-2.33/tcl8.4.18/unix:/home/amirreza/simulator/ns-allinone-2.33/tk8.4.18/unix:/home/amirreza/simulator/ns-allinone-2.33/ns-2.33/:/home/amirreza/simulator/ns-allinone-2.33/nam-1.14/

share|improve this question
    
Come to think of it, is this on a fresh install? Can you think of any reason your $PATH might be messed up? –  sebastian_k Feb 23 '11 at 14:05
    
Try adding /sbin and /usr/sbin to your current $PATH, separated by colons just like the rest. –  sebastian_k Feb 23 '11 at 15:32
add comment

1 Answer 1

hping usually needs to be run as root (just like many other network analysis tools).

That said, both /sbin and /usr/sbin should be in your $PATH. Not being able to run ifconfig is definitely not normal and a major annoyance. Here's my $PATH for your reference:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

You can display it using echo $PATH and edit it using export, like this:

export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

PS. My root $PATH is

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

... just in case.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.