In the ubuntu server I run, I added customisations in /etc/bash.bashrc
and as .sh
files in /etc/profile.d
, to add some useful aliases and functionalities for my users. All of them run correctly for my account.
However, logging into other accounts (including ones in the same groups as mine), be it via su
or ssh
, these customisations aren't loaded. Manually running . /etc/profile
does the trick, but afaik this should happen automatically at startup in interactive login shells. Running echo $0
from all accounts returns -bash
, so I assume they effectively are in such shells.
Why else could this be happening, and how can I fix it?
/etc
are only executed if the user does not already have one of their own in their home directory. If one is present, and you wish to also execute the default profile or RC file, simply add a call tosource
the relevant file in the personal configuration in the relevant users' home directories.~/.profile
overrides/etc/profile
.-DSYS_BASHRC
flag?bash -lx
to see what exactly gets executed on startup.