Hi Adam

On Mon, 2003-01-06 at 14:40, Adam H. Pendleton wrote:
> when I log is as my normal user, color ls is enabled, and I have all the
> regular aliases, such as "ll" and "l.".  When I perform a "su" to root,
> however, the aliases go away, as does the color ls.

When you perform an "su", be sure to add the "-l" or "-" option.  This
will cause "su" to log you in as root, which causes your shell (bash) to
read /etc/bashrc, which in turn sources the script files in
/etc/profile.d.  If you do not add the "-l" option, "su" simply changes
your user to root without doing most of the normal initialization.

Have a look near the end of /etc/bashrc for more information on how the
scripts in /etc/profile.d work.

> Running "bash -x /etc/profile.d/colorls.sh" as root...

Doing this will run colorls.sh in a subshell, so all changes to the
shell's environment will be lost when the script exits.  If you manually
want to run colorls.sh, try sourcing it like so:
# . /etc/profile.d/colorls.sh
or
# source /etc/profile.d/colorls.sh

(# indicates a command typed in a root shell)

search for "source" in the bash(1) manual page for more information.

Hope this helps.

-- 
Michael Wardle <[EMAIL PROTECTED]>
Adacel Technologies



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to