On Sat, 9 Sep 2006 04:56:16 +0300 "Angel Tsankov" <[EMAIL PROTECTED]> wrote:
> > Does this mean that 'su - glibc' should always start bash > as a login shell, i.e. with --login? > If no, what is "an > environment similar to what the user would expect had the user > logged in directly"? It means "whatever the shell does when it finds a "-" as first character in argv[0]. Bash's manpage says that " A login shell is one whose first character of argument zero is a - , or one started with the --login option." so the result of su - user should be the same as su user --login. > If so, then why do the following commands > still cause bash not to read ~/.bash_profile: I have no idea why it doesn't work for you. Are you sure that the glibc package user actually HAS a .bash_profile? Are you sure you're using the correct su? It definitely works for me: root> cat ~glibc/.bash_profile echo Hello, this is bash_profile PATH=/usr/bin:/bin/foo root> echo 'echo $PATH' | su glibc /bin:/usr/bin root> echo 'echo $PATH' | su - glibc Hello, this is bash_profile /usr/bin:/bin/foo root> echo 'echo $PATH' | su glibc --login Hello, this is bash_profile /usr/bin:/bin/foo MSB -- Those of you who think you know everything are very annoying to those of us who do. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
