I am trying to run rkhunter, but it is giving me this output:

➜ sudo rkhunter --check
Invalid BINDIR configuration option: Invalid 
directory found: ~/.dotnet/tools
Invalid BINDIR configuration option: Invalid 
directory found: 

How do I go into my PATH variable and remove these directories from all shell sessions? None of these directories are in my .bash_profile or .bashrc.

  • There is no reference to BINDIR in rkhunter.conf. And what do you mean by root's PATH? @dsstorefile1 – Cody Rutscher Aug 29 '18 at 17:46
  • root's PATH is the PATH of the user root. But sudo without -i shouldn't read root's profile. Themessage is about BINDIR. Try env -i /usr/bin/sudo rkhunter --check. – RalfFriedl Aug 29 '18 at 17:52
  • stack/security/rkhunter-1.4.6 ➜ env -i /usr/bin/sudo rkhunter --check Password: sudo: rkhunter: command not found @RalfFriedl – Cody Rutscher Aug 29 '18 at 17:54
  • Do you want me to post some of the information from rkhunter.conf?@dsstorefile1 – Cody Rutscher Aug 29 '18 at 17:54
  • 1
    Awesome. That worked. This may be off topic, but do you know if it says "warning", does that mean I have one or is it just a warning? – Cody Rutscher Aug 29 '18 at 18:36

In terminal, copy the results of path.

echo $PATH


Paste the contents of PATH into a text editor and remove the troublesome directory in the PATH from between PATH's delimiters, usually :.

Clear the PATH.

export PATH=""

Copy the edited PATH, and store it back in PATH.

export PATH="/your/:~/path/:/here/"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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