Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » All Things Unix » sudo and PATH
Search Topic:
Uniqs:
274
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
Changing kernels »
« Profile in Solaris terminal session  
AuthorAll Replies


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
Off the top of my head the only thing I got is
sudo su - -c "command"


koitsu
Premium
join:2002-07-16
Mountain View, CA
reply to laura
See the -s flag, compared to -i.


laura
Domestic Bliss
Premium
join:2002-04-16
San Jose, CA

reply to Bryan001
said by Bryan001 See Profile :

Off the top of my head the only thing I got is
sudo su - -c "command"
thank you that worked well.
--
43 things


yock
TFTC
Premium
join:2000-11-21
Fairfield, OH

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
-
Forums » Tech and Talk » OS and Software » All Things UnixChanging kernels »
« Profile in Solaris terminal session  


Monday, 09-Nov 07:42:10 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.republican-creole
page compression OFF
Most commented news this week
· [156] Cable Uncapper Faces Criminal Charges
· [140] AT&T Sues Verizon Over 3G Ads
· [112] Why Run Fiber When You Can Run Ads That Pretend You Do?
· [109] Comcast Is Simply Getting Huge
· [93] Apple Cooking Up New $30 A Month TV Service?
· [83] Bits Of ACTA Agreement Leaking Out
· [81] Will 'Three Strikes' Come To The United States?
· [78] Verizon To Double Smartphone ETFs?
· [77] Verizon: Droid Tethering Will Cost $30 Extra
· [73] Comcast, NBC Deal Almost Complete
Most people now reading
· Divorce advice... [General Questions]
· [WIN7] Which Services in Win 7 Have You Turned Off? [Microsoft Help]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· Boeing 720 Demolition [56k Lookout (Broadband Heavy)]
· Windows 7 boot manager editing questions [Microsoft Help]
· Framed for child porn 151; by a PC virus [Security]
· Connecting to Google Voice Via SIP [VOIP Tech Chat]
· Security Software Updates - 09 Nov 2009 [Security]
· Is Gear Score now the new requirement to get pug invite? [World of Warcraft]
· My cat is reluctant to exercise. [General Questions]