LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-07-2006, 04:39 PM   #1
w0262
LQ Newbie
 
Registered: Jan 2006
Posts: 3

Rep: Reputation: 0
Lightbulb Suse -- How to export user PATH to super user?


Hi there,

How can I use Suse's /etc/profile.local to add and export PATH settings so that a super-user login session can access files in the newly added path?

suppose my /etc/profile.local has a statement:

export PATH=$HOME/Programming:$PATH

No other profile files has such statement.

After reboot I open one super-user mode terminal and one user-login terminal. By typing in just: 'myprog' in each terminal I try to access a file "myprog" in /$HOME/Programming/. The user-login terminal can access "myprog", but the super-user mode terminal can NOT access it anywhere outside the the Programing/ directory.

Your help is appreciated.
tom
 
Old 01-07-2006, 04:47 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
Moved: This thread is more suitable in Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 01-07-2006, 04:49 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
Do you mean one specific 'myprog' that's located in your user's home directory, or also /root/Programming ? Note that $HOME has different value for every user.
 
Old 01-07-2006, 05:04 PM   #4
w0262
LQ Newbie
 
Registered: Jan 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Lightbulb

Yes Mara,

I shoulded clarify that my $HOME is set to /home/user1/

/home/user1 is the onwer of this 'myprog' file.

And 'myprog' is just one of many other files I want the super user and many other users to be able to access from their enviornment. Maybe I should not set and export the path this way, but what is the correct way?

ps. Thanks for moving my post the newbie.

tom
 
Old 01-07-2006, 05:08 PM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You could start out opening a normal terminal like konsole and use "su" instead of "su -l" to become root. The "-l" option is for login shell. This means that the roots profile is used. Another thing you could do is execute "PATH=$PATH:~user1/programming".
 
Old 01-10-2006, 09:39 PM   #6
w0262
LQ Newbie
 
Registered: Jan 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you showing me to use the PATH variable setting method. It works.
I would expect to see some other ways too.

t
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
super user ruslombia Linux - Software 5 12-15-2005 12:28 PM
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM
Super user mode does not respond in SUSE 9.1 ronronson Linux - Newbie 4 06-15-2004 03:51 PM
SuSE 8.0 and kfm super-user mode? rodda Linux - Software 3 05-14-2002 08:38 PM
normal user = super user jayakrishnan Linux - General 4 03-19-2002 09:58 AM


All times are GMT -5. The time now is 05:49 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration