Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] .bashrc not being source correctly
- Date: Fri, 27 Aug 2010 12:02:53 +0900
- From: Bruno Raoult <braoult@example.com>
- Subject: Re: [tlug] .bashrc not being source correctly
- References: <AANLkTikOkDdVbMOkHApZN16QJ7=PXP_5KOiEJNbxhro1@example.com> <AANLkTin=r7FND8LK=jY_aQfX3g_xEaY2cg1LcE1LmK7g@example.com> <AANLkTik-oQo+8vw2oNED+oE8PtXziVeg2MG18F1F4dAy@example.com>
I just made a test, and .bashrc is evaluated when I "su -" (and also when I "su"): br@example.com:~$ cat ~br-test/.bashrc export FOO=BAR br@example.com:~$ echo $FOO br@example.com:~$ su - br-test Password: br-test@example.com:~$ echo $FOO BAR br-test@example.com:~$ logout br@example.com:~$ cat ~br-test/.bashrc export FOO=BAR br@example.com:~$ echo $FOO br@example.com:~$ su br-test Password: br-test@example.com:/home/br$ echo $FOO BAR br. On Fri, Aug 27, 2010 at 11:33, Jean-Christian Imbeault <jc.imbeault@example.com> wrote: > You're right but I've set the shell to be bash: > > www-data@example.com:~$ cat /etc/passwd | grep www > www-data:x:33:33:www-data:/var/www:/bin/bash > www-data@example.com:~$ echo $SHELL > /bin/bash > > I thought that setting the shell to bash would cause any .bashrc > present to be used but I must have missed something. > > Jc > > On Fri, Aug 27, 2010 at 11:23 AM, Bruno Raoult <braoult@example.com> wrote: >> Hi Jean-Christian, >> >> I don't know about your setup, but on my machine, the user www-data >> uses "sh" (not bash). >> >> Regards, >> >> Bruno. >> >> On Fri, Aug 27, 2010 at 10:55, Jean-Christian Imbeault >> <jc.imbeault@example.com> wrote: >>> When I su to a different user I've noticed that my .bashrc doesn't >>> seem to be sourced since the .bashrc_aliases isn't being used. >>> >>> Specifically: >>> >>> jci@example.com:~$ su - www-data >>> www-data@example.com:~$ ls -a .bash* >>> .bash_aliases .bash_history .bashrc >>> www-data@example.com:~$ cat .bash_aliases >>> alias ll="ls -l" >>> www-data@example.com:~$ ll >>> ll: command not found >>> >>> My .bashrc contains the following near the end of the file: >>> >>> if [ -f ~/.bash_aliases ]; then >>> . ~/.bash_aliases >>> fi >>> >>> I know there is nothing wrong with the .bashrc since I can source it >>> and then my alias works. So I'm guessing the .bashrc is not getting >>> sourced at all when I do 'su - www-data'? >>> >>> Thanks! >>> >>> -- >>> To unsubscribe from this mailing list, >>> please see the instructions at http://lists.tlug.jp/list.html >>> >>> The TLUG mailing list is hosted by the award-winning Internet provider >>> ASAHI Net. >>> Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/ >>> >> >> >> >> -- >> 2 + 2 = 5, for very large values of 2. >> >> -- >> To unsubscribe from this mailing list, >> please see the instructions at http://lists.tlug.jp/list.html >> >> The TLUG mailing list is hosted by the award-winning Internet provider >> ASAHI Net. >> Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/ >> > > -- > To unsubscribe from this mailing list, > please see the instructions at http://lists.tlug.jp/list.html > > The TLUG mailing list is hosted by the award-winning Internet provider > ASAHI Net. > Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/ > -- 2 + 2 = 5, for very large values of 2.
- References:
- [tlug] .bashrc not being source correctly
- From: Jean-Christian Imbeault
- Re: [tlug] .bashrc not being source correctly
- From: Bruno Raoult
- Re: [tlug] .bashrc not being source correctly
- From: Jean-Christian Imbeault
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] .bashrc not being source correctly
- Next by Date: Re: [tlug] .bashrc not being source correctly
- Previous by thread: Re: [tlug] .bashrc not being source correctly
- Next by thread: Re: [tlug] .bashrc not being source correctly
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links