LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-18-2003, 11:31 PM   #1
bparke
LQ Newbie
 
Registered: Nov 2003
Distribution: RedHat 9
Posts: 5

Rep: Reputation: 0
Deleted the /root/.bash_profile, looking for default


In a silly attempt to fix a gnome profile problem I deleted all files and directories in /root that start with . (dot), including the .bash_profile. So, when I log in as root now I don't have the correct aliases (i.e. the -i on rm, etc..) and my path doesn't include the /sbin and stuff. Anyhow, I'm looking for the default RedHat 9 .bash_profile for the root user. I could go manually build it again but kinda want to start with the original if possible.

I've tried and tried to find an answer to this without posting but had no luck.

Thanks to anyone who can help.

(if I'm asking the question incorrectly I apologize, I'm assuming that .bash_profile is the one that would have the settings I'm looking for, if it is another file, please let me know)
 
Old 11-19-2003, 12:22 AM   #2
joakim12
Member
 
Registered: Nov 2003
Location: Estonia
Distribution: Estobuntu
Posts: 34

Rep: Reputation: 15
If you deleted them from root, then you might have them in other users's accounts. Or maybe you have directory /etc/skel, where root should keep this kind of files. See man useradd. You can also get some information at: http://www.linuxfromscratch.org/blfs...s/profile.html
 
Old 11-19-2003, 12:35 AM   #3
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
Hi!

These are the files from a "virgin" RedHat 8 machine. I can't imagine that they should have changed much.

.bash_profile
Code:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"

export USERNAME BASH_ENV PATH

.bashrc
Code:
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
Regards
Martin
 
Old 11-19-2003, 01:02 AM   #4
Bluesuperman
Member
 
Registered: Nov 2002
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
You do not need one -- none of my boxes have them -- they all use bash and use the /etc/profile one as the standard, the .bash_profile is really only need for individual / custom settings.

Michael.
 
Old 11-19-2003, 06:12 PM   #5
bparke
LQ Newbie
 
Registered: Nov 2003
Distribution: RedHat 9
Posts: 5

Original Poster
Rep: Reputation: 0
thanks all. MartinN, that is exactly what I was looking for. Especially (now that I understand) the .bashrc, mostly for the aliases/etc.

Now I won't go rm'ing an entire directory when logged in as root (those -i's really help )

Thanks again!
 
  


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
Urgent! Deleted Root! goosie Mandriva 12 06-30-2005 07:50 PM
need root .bashrc .bash_profile darkRoom Slackware 5 04-30-2005 03:24 AM
.bash_profile as root knoxlinuxuser Linux - Newbie 3 02-26-2005 10:48 AM
.bash_profile overwritten on login to root Awesome Dude Linux - Newbie 1 08-23-2004 02:41 PM
Deleted root user france Linux - Newbie 1 04-30-2004 06:57 AM


All times are GMT -5. The time now is 05:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration