1

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 ~/.bashrc

Insert this where you keep your other alias's, for organizations sake ../../extensions/custom_smilies_2/img1/wink:

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/skel

That's it, you will now have the access you need.

Faith without works is dead, faith without hearing is deaf. Salvation is dead without Faith and Works. But Salvation is not dependant on Works. You can always have Salvation, you just have to accept the gift that was given in love, from God himself, Jesus Christ. -- Aaron Echols