[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash version: 4.3.27(1) and .bashrc / .bash_profile

From: Chet Ramey
Subject: Re: bash version: 4.3.27(1) and .bashrc / .bash_profile
Date: Sat, 08 Nov 2014 17:45:32 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/7/14 5:02 PM, jmiguel.rodriguez@gmail.com wrote:
> Hi all!
> I patched 4 servers some weeks ago ( bash version: 4.3.27(1) ) following the 
> https://shellshocker.net/ guide (which it's a simple easy way for downloading 
> https://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz plus patches and compile it)
> Today I realized some processes were not working as expected. After some 
> investigation I've realized that when executing commands as:
> su - [user] -c [command]
> neither .bashrc o .bash_profile on user home directory are executed. If I 
> just execute
> su - [user]
> everything it's fine.

This is controlled by the NON_INTERACTIVE_LOGIN_SHELLS option in
config-top.h.  It's not enabled by default.  Define that option and
rebuild, and you should have the behavior you want.

I don't know what version of bash you replaced, but it's likely that Red
Hat defined that option before building the version of bash shipped with
Fedora 6.  It's been there for 15 years.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]