Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » All Things Unix » sudo and PATH
Search Topic:
Uniqs:
314
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  


Wednesday, 09-Dec 03:26:11 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [194] Sprint Sued For Distracted Driving Death
· [81] 3G Network Test Says AT&T Is Tops
· [72] Mediacom Unveils 105 Mbps Pricing
· [62] Sprint Poised For A Turnaround?
· [50] The Future Of Wi-Fi Is Bright
· [50] WPA Cracker: Test WPA-PSK Networks In 20 Minutes
· [47] Site Leaks Yahoo, Verizon Fed Data Share Pricing
· [44] Microwaving Your Innards Is Not 'Extreme'
· [39] Verizon LTE: 5-12 Mbps Downstream
· [20] AT&T Releases Network Reporting iPhone App
Most people now reading
· [How to] Install Asterisk on an Asus WL-520GU router [VOIP Tech Chat]
· Comcast refused to install 400' feet. [Comcast HSI]
· Windows 7 boot manager editing questions [Microsoft Help]
· Man Downloads Child Porn "Accidentally," Faces 20 Years [Security]
· Maximizing Rogue DPS for 3.1 [World of Warcraft]
· SB6120 Firmware update [Comcast HSI]
· Extjs grid combo box. [Webmasters and Developers]
· Adobe Flash Player version 10.0.42.34 [Security]
· Tomato/MLPPP v3 alpha 6 released! [TekSavvy]
· [ Classes] ATTN Death Knights - Post your spec for critique! [World of Warcraft]