Topic: export custom PATH variables for SUDO
If you are having problems with sudo accessing a custom PATH that you have setup, simply add the following to your home folders bashrc file:
vi ~/.bashrcInsert this where you keep your other alias's, for organizations sake
:
alias sudo="sudo env PATH=$PATH:/path_to_new/custom_cmd:/a_different_custom_cmd"Now when you execute sudo custom_cmd, it will now correctly execute the file. If you want this to work for all future users, simply copy your custom .bashrc to /etc/skel:
sudo cp ~/.bashrc /etc/skelThat's it, you will now have the access you need.