LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-26-2004, 12:49 PM   #1
danahata
Member
 
Registered: Aug 2003
Posts: 30

Rep: Reputation: 15
how to change 'su' path


How do you change the PATH you get when you type just 'su' (not 'su -').

I've tried /etc/profile and /etc/rc.d/rc.K , and neither work.

Seems simple, but I can't find the answer anywhere.

Dana
 
Old 02-26-2004, 12:57 PM   #2
bnice
Member
 
Registered: Feb 2004
Location: Sacramento, CA
Distribution: Slack 9.1, slackware-current
Posts: 284

Rep: Reputation: 30
`man su`
<snip>
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.
 
Old 02-26-2004, 01:01 PM   #3
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
do you mean the actual PATH, or the directory you are in when you su to root?
 
Old 02-26-2004, 01:05 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Are you talking about adding something to the default PATH environment, or change the default itself?

Adding to the default can be done by editing (creating) /root/.bashrc.

The default PATH environments are set in /etc/login.defs. I would suggest not changing these, unless you realy know what you are doing.

Hope this helps.
 
Old 02-26-2004, 01:09 PM   #5
danahata
Member
 
Registered: Aug 2003
Posts: 30

Original Poster
Rep: Reputation: 15
/etc/login.defs worked

Thanks
 
  


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
how to change the install path? SharpyWarpy Fedora 0 11-24-2005 09:34 AM
keep change in PATH alchem Linux - Newbie 11 08-28-2005 04:08 PM
How do I change PATH? trotsky Linux - Software 4 12-28-2004 01:08 PM
How do i change the $PATH explorer Fedora 6 10-24-2004 03:21 AM
how do you change your path? zeviddalop Linux - Newbie 3 09-20-2004 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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