Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (5) </ 1 [2] 3 4 5 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: /opt/bin in root's PATH, For ucis< Next Oldest | Next Newest >
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Oct. 27 2006,16:13 QUOTE

dsl@box:~$ su - root
Password:
root@ttyp0[root]# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games:/opt/bin:.
root@ttyp0[root]#

Looks like /opt/bin is there to me.
What root access/login procedure is being attempted?
Back to top
Profile PM WEB 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 27 2006,16:25 QUOTE

PATH is set when a login shell happens - if it isn't a login shell, profile won't be sourced.

I believe most distros have root's PATH set differently anyways.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Oct. 27 2006,17:19 QUOTE

dsl@box:~$ sudo su
bash-2.05b# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin

I see your point, hats....hadn't thought about that.

another variation...
dsl@box:~$ sudo echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games:/opt/bin:.:.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 27 2006,17:34 QUOTE

Right, so you'd want to use sudo su -
Back to top
Profile PM 
WDef Offline





Group: Members
Posts: 798
Joined: Sep. 2005
Posted: Oct. 29 2006,13:40 QUOTE

Ah, helpful replies guys, thx.  On most distros it's the ordinary user's PATH that's more restricted than root's.  dsl has a non-login root shell, but it's still root.

I noticed this because /opt/bin isn't in PATH when I open a root shell from the right-click menu (I only rarely type su - on dsl) and it might be useful if binaries linked into /opt/bin could be found from any type of root shell, just like binaries in /bin whatever, hence found by other apps running as root that look in PATH.

Root should be able to find anything in PATH that user dsl can, yes?
Back to top
Profile PM 
20 replies since Oct. 07 2006,10:35 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (5) </ 1 [2] 3 4 5 >/
reply to topic new topic new poll
Quick Reply: /opt/bin in root's PATH

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code