[Bug 3883] /etc/profile is always executed

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Sat Oct 18 02:33:14 AEDT 2025


https://bugzilla.mindrot.org/show_bug.cgi?id=3883

butirsky at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|/etc/profile is always      |/etc/profile is always
                   |executes                    |executed

--- Comment #1 from butirsky at gmail.com ---
So it's apparently ~/.bashrc which is actually being invoked, and this
behavior described in bash manual:

       Bash attempts to determine when it is being run with its
standard input connected to a network connection, as when executed by
the historical remote shell daemon, usually rshd, or the secure shell
daemon
       sshd.  If bash determines it is being run non-interactively in
this fashion, it reads and executes commands from ~/.bashrc, if that
file exists and is readable.  It will not do this  if  invoked  as  sh.
       The  --norc  option  may be used to inhibit this behavior, and
the --rcfile option may be used to force another file to be read, but
neither rshd nor sshd generally invoke the shell with those options or
       allow them to be specified.

Not sure what are solutions here, though.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list