[SATLUG] BLFS -- root's PATH is all messed up...
Bruce Dubbs
bruce.dubbs at gmail.com
Tue May 22 23:29:57 CDT 2007
Travis M. wrote:
> Hello,
>
> I have finally got to BLFS, after compiling a kernel, configuring
> GRUB, and then rebooting!
>
> However, I seem to have ran into a problem...it seems that root's PATH
> enviroment variable is all messed up, after I installed Linux-PAM (the
> one from the LFS book, since it's slightly newer), and reinstalled
> Shadow (from the BLFS book). The BLFS book says to create a
> "~/.bashrc" file, but I dunno how to create a working one, and Lynx is
> horrible on my laptop (VGA text console with small letters, it's a
> *feature* specific to my laptop). I might need to create more than
> just the "~/.bashrc" file, so I need to know what I need to do to set
> a working PATH enviroment variable at login time. I'll also need to
> know what a working PATH is, of course.
>
> Without a working PATH, I won't be able to install OpenSSH-Server or
> configure IPTables right now, and so I really need a working PATH.
To change the default font, try putting vga=ask on the kernel line in
grub. Then you can set another font. For instance, I use vga=0xf07.
I don't use PAM on my systems. Since I'm the only user, I don't see the
need. BTW, there is no PAM in the LFS book. Perhaps you are referring
to shadow. In any case, PAM will only affect your ability to login. It
will not affect initialization of the shell after login.
Since you are probably working as root, you really need to create good
/etc/profile and /etc/bashrc files.
BLFS gives examples of both in Chapter 3. The /etc/profile has:
# Set the initial path
export PATH=/bin:/usr/bin
if [ $EUID -eq 0 ] ; then
pathappend /sbin:/usr/sbin
unset HISTFILE
fi
That should fix your PATH problem. Don't worry too much about
customization of ~/.bash_profile and ~/.bashrc yet, but the same section
gives examples of those. Use them in conjunction with the bash man page
to learn about the initialization process and decide about any
modifications that you may want to make.
-- Bruce
More information about the SATLUG
mailing list