suggestion: protect users (root) from themselves

Eric mailing-lists at digitaleric.net
Fri Oct 11 22:17:35 PDT 2002


Hi

Although I have setup many LFS systems before, I just repeated a very 
newbie-like mistake which I've made several times before.  The creation of 
the LFS user's .bash_profile (cat > ~/.bash_profile << "EOF") is on the 
same page as several commands which are supposed to be run as root (adding 
the lfs user and assigning ownership of the $LFS/static directory).  Yes, 
you guessed right. . . I overwrote /home/root/.bash_profile (again).  
Obviously, the moral of the story is "don't do that!", but I think it might 
be a little more user friendly if the .bash_profile creation either used

cat > ~lfs/.bash_profile << "EOF"
       ^^^

or was wrapped inside a test like

if [ `whoami` == root ]
  then echo "DON'T RUN THIS STEP AS ROOT"
  else cat > ~/.bash_profile << ...
fi

I really love the LFS project, thanks for such a great resource.

-Eric
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list