Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-28-2006, 09:59 PM   #1
Registered: Jan 2006
Location: taiwan
Posts: 156

Rep: Reputation: 30
Copy all enviornment settings to another user

If I want to copy all enviornment settings ( eg . PATH , set ) of root user to another user , what can I do ? thx
Old 11-28-2006, 10:47 PM   #2
LQ Guru
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 65
If its just the PATH you want, it's usually set in /etc/profile for newer versions of bash:

# Set the default system $PATH:

# For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
# the $PATH.  Some means of connection don't add these by default (sshd comes
# to mind).
if [ "`id -u`" = "0" ]; then
  echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
  if [ ! $? = 0 ]; then
You can just add the line:


To whichever user's .bashrc, or edit /etc/profile and change it systemwide, or edit that if loop up there and make it true for more UIDs than just 0.




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
Can I copy all my personal settings to another account? kryptobs2000 Linux - Newbie 8 06-03-2006 08:25 PM
copy the settings of gnome and kde yumener Linux - Software 1 06-02-2006 08:23 AM
Copy SuSE eth0 settings to Mandrake davonz Linux - Networking 5 10-25-2005 08:30 AM
copy KDE settings to another user jlinkels Linux - Software 1 09-02-2004 04:21 AM
copy kde settings PenGPow Linux - Software 1 11-01-2003 04:55 PM > Forums > Linux Forums > Linux - Software

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

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