aireplay-ng command not found

8,267

It's most likely a issue with your $PATH if it works as root but does not as normal user (aireplay-ng is installed in an sbin-directory, which normally only appears in $PATH when logged in as root). This is on purpose, though, since you need special privileges to run aireplay-ng (you want to fiddle with your network card, though, which shouldn't be possible for every normal user, should it?).

Share:
8,267

Related videos on Youtube

ewizard
Author by

ewizard

Hold on, one sec, let me start my google machine...

Updated on September 18, 2022

Comments

  • ewizard
    ewizard over 1 year

    I just downloaded and installed Kali Linux on my MacBook Pro (dual boot) to mess around with penetration testing - I have experience with aircrack-ng, but it was a while ago (and I was at least unaware of the distributions geared towards penetration testing). Finally got everything up and running, and customized the way I want - I tried to run the basic injection test aireplay-ng -9 wlan0 in the terminal and I get command not found when I try it as admin. The weird thing is it seems to work as root (I didn't try running the test - I just typed in aireplay-ng to see if it recognized the command, and it does). I don't think it is a PATH problem, but I added /usr/sbin/aireplay-ng to /root/.bashrc like this (just incase):

    PATH=~/usr/sbin/aireplay-ng:$PATH
    

    I don't think it is the path, because - as you can see, aireplay-ng is located in /usr/sbin/ which is already part of my PATH variable (noticeable when I execute echo $PATH).

    The odd part is - when I log in as root, it seems to work - I didn't actually run the test as root (probably not the best idea), but I did type in aireplay-ng to see if the command was recognized, and it was. Not sure if a symlink would help - but I'm not going to try anything until I get a response.

    Just trying to get the aireplay-ng command recognized. Thanks in advance.

  • ewizard
    ewizard about 10 years
    thanks! and yes i do like fiddling lol - so you are saying that i am supposed to run these tests as root? i thought that might be a bad idea (usually doing anything as root is frowned upon lol).
  • ewizard
    ewizard about 10 years
    you are right about path! just did echo $PATH as normal user and sbin isnt there - how do i change this for this user?
  • Andreas Wiese
    Andreas Wiese about 10 years
    You could modify your shell's startup files (~/.bashrc for bash, ~/.zshrc for zsh), but I guess this won't help. I think you'd have to run aireplay-ng as root.
  • ewizard
    ewizard about 10 years
    ok - i guess there isnt a problem - thanks for your help!