LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-21-2004, 10:21 AM   #1
tvn
Member
 
Registered: Mar 2004
Posts: 96

Rep: Reputation: 15
# su does not update path


when I 'su' to root, the $PATH is not set . How to fix this ?

$ su // $PATH is unset
Password:
# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin

# su - // $PATH is set fine here
# echo $PATH
/usr1/bin:/opt/Software/Multimedia/RealPlayer:/opt/Software/Development/Java/jsk/bin:/root/bin:/sbin:/usr/sbin:/usr/local/sbin/:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/root/kde3.2.3/bin
 
Old 06-21-2004, 12:59 PM   #2
fluppi
Member
 
Registered: Oct 2003
Location: Switzerland (Europe)
Distribution: OpenSuSE, RedHat, Knoppix, IRIX + MacOSX
Posts: 198

Rep: Reputation: 31
What do you want to fix, it's running perfectly:
"su" = change only the user, without a name it's root
"su -" = change user and load his environment, without a name it's root
 
Old 06-21-2004, 11:18 PM   #3
tvn
Member
 
Registered: Mar 2004
Posts: 96

Original Poster
Rep: Reputation: 15
when doing just 'su' , it should inherit the user's environments and variables - correct ?
 
Old 06-22-2004, 02:11 AM   #4
fluppi
Member
 
Registered: Oct 2003
Location: Switzerland (Europe)
Distribution: OpenSuSE, RedHat, Knoppix, IRIX + MacOSX
Posts: 198

Rep: Reputation: 31
Yes, but I wouldn't say inherit, just "su" changes nothing except the username and allow you doing things in his name with his permissions.
 
  


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
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 07:45 AM
Apache path and kde path questions darkraider Debian 1 11-12-2005 05:07 AM
What is the debian way to update Library path? Akhran Debian 1 08-23-2005 09:07 AM
Removing path form PATH maginotjr Linux - Newbie 3 02-12-2005 02:23 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 > Debian

All times are GMT -5. The time now is 11:46 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