 lauraDomestic BlissPremium 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 |
|
 Bryan001Premium join:2002-08-17 Saint Louis, MO | Off the top of my head the only thing I got is sudo su - -c "command" |
|
 koitsuPremium,MVM join:2002-07-16 Mountain View, CA kudos:14 | reply to laura See the -s flag, compared to -i. |
|
 lauraDomestic BlissPremium join:2002-04-16 San Jose, CA | reply to Bryan001 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 |
|
 yockTFTCPremium join:2000-11-21 Miamisburg, OH kudos:3 | reply to laura 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 |
|
|
|