LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 12-27-2009, 06:20 PM   #1
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
$PATH with su and su -


I seam to be getting different things in path when I run a su or a su - the su - give me the correct pathing that is setup for root while su just gives me the same as a normal user plus /sbin and /usr/sbin? I am wondering why when you invoke the su that it does not re read the /etc/profile for path information. Is there a way I can add this somewhere to make it work? I was thinking of putting it in the /etc/bashrc with a line like source /etc/profile but I dunno if that would be right or not. Any thoughts everyone?
 
Old 12-27-2009, 06:27 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,152

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
WAD - the manpage didn't explain this ?.
 
Old 12-27-2009, 07:46 PM   #3
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Original Poster
Rep: Reputation: 87
Lol funny you should mention that cause right after posting this I did read it and found this
Code:
 The current environment is passed to the new shell. The value of $PATH
       is reset to /bin:/usr/bin for normal users, or
       /sbin:/bin:/usr/sbin:/usr/bin for the super user. This may be changed
       with the ENV_PATH and ENV_SUPATH definitions in /etc/login.defs.
this seams to explain some things but not everything. For instance /usr/X11R6/bin gets passed along as well. I don't think thats hard coded into the system and I am not setting ENV_SUPATH anywhere. I was wondering if just appends the path in some places.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 05:48 PM
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-13-2009 11:25 PM
Do you add to the path line or make a new path in /etc/profile? M$ISBS Linux - Newbie 2 12-13-2006 02:14 PM
script to change unix path to windows path in all files csross Programming 8 04-29-2006 01:05 PM
How to Chnage Python's module search path (sys.path)? lramos85 Linux - Software 1 05-02-2004 06:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration