[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] su



vivek@xxxxxxxx forced the electrons to say:
> hello all,	
> 	When we generally login through normal procedure .bash_profile
> will be executed. But suppose, when I logged into my login from other
> user's bash(I mean su - vivek and then password) .bash_profile will not be
> executed. So can n1 tell me how to do it? Is there any such procedure?

When bash is not invoked as a login shell, then the configuration file it
looks for is ~/.bashrc. Keep this file as a symlink to ~/.bash_profile.

I suggest keep a link from ~/.profile to ~/.bash_profile as well, since bash
does not source ~/.bash_profile when invoked as sh (many programs do this when
spawning a shell).

Binand

-- 
#include <stdio.h>                                   | Binand Raj S.
char *p = "#include <stdio.h>%cchar *p = %c%s%c;     | This is a self-
int main(){printf(p,10,34,p,34,10);return 0;}%c";    | printing program.
int main(){printf(p,10,34,p,34,10);return 0;}        | Try it!!
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.