Home > linux > sudo forgot /sbin

sudo forgot /sbin

December 10th, 2012 Leave a comment Go to comments

I got confused by some APT messages today, saying it cannot find ldconfig. A little trial-and-error made me found my environment (PATH) has forgotten /sbin and other folks. Long story short, it turns out sudo did not source the environment correctly, leaving out root-depending paths. Adding the following line at the top of  /etc/sudoers will fix this:

Defaults        secure_path=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”

So long…

Categories: linux Tags:
  1. No comments yet.
  1. No trackbacks yet.