 laura Domestic Bliss Premium join:2002-04-16 San Jose, CA
| sudo and PATH I know that in SUSE, when I use sudo it uses my PATH by default and not roots path. Is there a way to make it use root's path? or at least add something to the PATH? I've looked at /etc/sudoers but I'm not sure what to add there or if it's even possible. -- 43 things | |
|
 Bryan001 Premium join:2002-08-17 Saint Louis, MO | Re: sudo and PATH Off the top of my head the only thing I got is sudo su - -c "command" | |
|
 |   laura Domestic Bliss Premium join:2002-04-16 San Jose, CA
| Re: sudo and PATH said by Bryan001 :Off the top of my head the only thing I got is sudo su - -c "command" thank you that worked well. -- 43 things | |
|
  koitsu Premium join:2002-07-16 Mountain View, CA | See the -s flag, compared to -i. | |
|
  yock TFTC Premium join:2000-11-21 Fairfield, OH
| The extra dash in...
sudo - -c "command"
...indicates that sudo should source root's profile. Among other things, that'll get you /sbin and the like in $PATH. You could always reference the full path of the command if you don't need everything else that comes with root's profile. -- Have more fun with your GPS. Geocaching.com | |
|
 |
|
 |