Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


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

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


Tuesday, 01-Dec 08:28:26 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
· [60] Baltimore To Ban Lazy Cable Installs
· [48] Broadband Killed The Game Console
· [36] Rural Carriers Quickly Embracing Fiber
· [33] AT&T Top Lobbyist Cicconi Has His Feelings Hurt
· [28] Charter Exits Chapter 11
· [22] Midcontinent Socked With Easement Lawsuit
· [4] Monday Evening Links
· [3] Monday Morning Links
· [0] Tuesday Morning Links
Most people now reading
· Is Microsoft Technet ok to use for my family PC's? [Microsoft Help]
· Windows 7 boot manager editing questions [Microsoft Help]
· Heating - my dad gave me this advice... [Home Repair & Improvement]
· Considering Leaving Vonage, who should I Consider? [VOIP Tech Chat]
· IMG 1.7 (IMG Updates and Discussion) [Verizon FIOS TV]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· Connecting to Google Voice Via SIP [VOIP Tech Chat]
· [Rant] called out sick! [Rants, Raves, and Praise]
· buying a one way ticket [General Questions]
· [News] Windows 8 Release 2012? [Microsoft Help]