[arch-dev-public] System-wide bashrc?

Ronald van Haren pressh at gmail.com
Tue Aug 25 05:48:19 EDT 2009


On Tue, Aug 25, 2009 at 11:30 AM, RedShift<redshift at pandora.be> wrote:
> Thomas Bächler wrote:
>>
>> RedShift schrieb:
>>>
>>> /usr/bin/bash2:
>>> #!/bin/bash
>>> bash --rcfile /etc/bashrc
>>>
>>> and then
>>>
>>> echo "/usr/bin/bash2" >> /etc/shells
>>> usermod -s /usr/bin/bash2 myuser
>>
>> Yes, or create /etc/bashrc, then /etc/bashrc.d/ and allow to move files
>> there just like /etc/profile.d.
>>
>
> I was only illustrating the idea I had about how I would fix it, shouldn't
> be much hassle to add the features you're talking about.
>
>> But then you'd need ". /etc/bashrc" in all user ~/.bashrc.
>
>
> That's problem I've just solved by using a custom shell script that wraps
> around bash?
>
>
>> I was hoping there was some magical mechanism that would apply systemwide.
>>
>
> Not according to the manpage. I wonder why they haven't built in a feature
> like this, seems pretty trivial to me... I still like my solution though,
> because it allows you to select which users adhere to /etc/bashrc and which
> not. For example, for root it may have unexpected consequences due to what's
> being read from /etc/bashrc.
>
>
> Glenn
>

you could modify the files in /etc/skel. These files are used as a
template when creating a new user, not sure if it helps you with
existing users though.

Ronald


More information about the arch-dev-public mailing list