-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It would appear that on Sep 16, Kenneth Porter did say: > I have it identically defined in both ~/.bash_profile and ~root/.bash_profile. > That's what's mysterious. The variable loses my mortal definition if I neglect > to use -l on su. (And of course gets root's definition if use -l.) I'm > suspecting that some "helpful" script is cleaning the environment when I su, > presumably as a security measure. Hmmnnn of course you know the ~/.bash_profile is only used for "login" shells. An extract from a "man bash" says: - -> When an interactive shell that is not a login shell is started, bash - -> reads and executes commands from ~/.bashrc, if that file exists. This - -> may be inhibited by using the --norc option. The --rcfile file option - -> will force bash to read and execute commands from file instead of - -> ~/.bashrc. - -> - -> When bash is started non-interactively, to run a shell script, for - -> example, it looks for the variable BASH_ENV in the environment, expands - -> its value if it appears there, and uses the expanded value as the name - -> of a file to read and execute. Bash behaves as if the following com- - -> mand were executed: - -> if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi - -> but the value of the PATH variable is not used to search for the file - -> name. A better place for it might be in your ~/.bashrc file and in what ever file you set BASH_ENV to. Note: If your ~/.bash_profile has something like this in it: # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi Then the ~/.bashrc settings would also be applied to login shells. Hope this helps... ################################################################# # gpg sig for: Joe (theWordy) Philbrook <JtWdyP@xxxxxxxx> (:-0% # # You can find my public gpg key at http://pgpkeys.mit.edu/ # ################################################################# -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBTgQtRZ/61mwhY94RAlyxAKDDG9/VgycAOstFjBhecTny7kVYDACeJIe7 o+dXRaDgvXNkCV6KWJ6UXl4= =6mG7 -----END PGP SIGNATURE----- -- | --- ___ | <0> <-> Joe (theWordy) Philbrook | ^ J(tWdy)P | ~\___/~ <<jtwdyp@xxxxxxxx>>