Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


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


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

reply to laura
Re: sudo and PATH

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


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


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

Bryan001
Premium
join:2002-08-17
Saint Louis, MO
reply to laura
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

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


Friday, 27-Nov 10:35:48 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
· [116] Time Warner Cable Fires Broadside At Broadcasters
· [109] New AT&T Ad Campaign Hits Back At Verizon
· [95] Apple Joins AT&T Verizon Snark Fest
· [87] New Bill Takes Aim At Higher Verizon ETFs
· [70] TiVo Sees Record Customer Losses
· [67] In-Flight Internet Headed For Bumpy Landing?
· [58] Thanksgiving Open Thread
· [38] ICANN Slams DNS Redirection
· [36] Senators Want ACTA Made Public
· [35] Despite Billions In USF Fees, U.S. Libraries Lack Bandwidth
Most people now reading
· Newegg Black Friday Sale started [Users Find Hot Deals]
· Not strictly "Home" related - but WOW anyways... [Home Repair & Improvement]
· Windows 7 boot manager editing questions [Microsoft Help]
· Whats the big deal about being "Old School"....? [World of Warcraft]
· SSD [Computer Hardware Discussion/Reviews]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· So we need a legitimate reason to use a lot of bandwidth? [TekSavvy]
· Bell Response to PIPEDA Request [TekSavvy]
· New exploit masquerades as Flash Player upgrade [Security]
· HOW-TO: QoS and Tomato (fixes "choppy voice") [MagicJack]