El Wed, 28 Mar 2007 00:44:45 -0700 "Bob Young" <[EMAIL PROTECTED]> escribió:
> Probably a PEBSAC > > If so, that's ok I'm willing to learn. Like the title says, if I log > in as root /root/.bashrc and /root/.bash_profile are sourced. However > if I login as BYoung and am authenticated by the NIS server (SFU on > aWindows Domain Controller), then /home/BYoung/.bash_profile > and /home/BYoung/.bashrc are not sourced. As workaround, I've added: > "source ~/.bash_profile" as the last line of /etc/profile, and that > works, but of course .bash_profile and .bashrc get executed twice > when I log in as root. > > I'd like to fix this the right way, pointers and/or advice greatly > appreciated, and if I'm just doing something stupid, let me know. > > TIA > Bob Young > San Jose, CA > I don't know exactly what happens here, but have you tried ~/.bash_login and ~/.profile ? They are sourced when bash is run as interactive login shell. Also, to completely discard any silly mistake, can you source them by hand when you are logged? Note that bashrc is not sourced on non-loging shells, so it is not relevant here. Are you sure as root it is sourced? It would greatly surprise me. That is, unless you have them symlinked, sourced from withing each other or something. As spoken by the bash man page, and my own experience, on login shells, bash sources /etc/profile, and then, in this order, one of ~/.bash_profile, ~/.bash_login and ~/.profile . ONLY ONE of between these three files, the one that is found first, in that same order. The others are discarded, even if they exist. So, be sure you don't have any empty .bash_profile that is blocking the other two. On non-login shells, the thing is easier, both /etc/bash/bashrc and /home/6thpink/.bashrc are sourced if found. And NONE of the files sourced by a login shell is sourced by a non-login one. -- Jesús Guerrero -- gentoo-user@gentoo.org mailing list