Mailing List Archive

[Bug 1524] New: Problem with non-interactive logins and bash on Solaris
https://bugzilla.mindrot.org/show_bug.cgi?id=1524

Summary: Problem with non-interactive logins and bash on
Solaris
Product: Portable OpenSSH
Version: 5.1p1
Platform: UltraSparc
OS/Version: Solaris
Status: NEW
Severity: normal
Priority: P2
Component: sshd
AssignedTo: unassigned-bugs@mindrot.org
ReportedBy: chris.oregan@gmail.com


We just upgraded OpenSSH on our Solaris systems from 4.7p1 to 5.1p1.
Now bash no longer executes .bashrc when a user starts a
non-interactively ssh session. Note that this is for Solaris 9 and 10.

>From the bash man page (under INVOCATION):

"When bash is started non-interactively, to run a shell script, for
example, it looks for the variable BASH_ENV in the environment, expands
its value if it appears there, and uses the expanded value as the name
of a file to read and execute."

If I set BASH_ENV in ~/.ssh/environment (and set PermitUserEnvironment
to "yes" in sshd_config) then I can run any file I specify. Setting
this option, however, does not sound safe for normal use.

"Bash attempts to determine when it is being run by the remote shell
daemon, usually rshd. If bash determines it is being run by rshd, it
reads and executes commands from ~/.bashrc, if that file exists and is
readable."

I have tried several versions of bash including the latest (v3.2) and
all exhibit the problem with OpenSSH 5.1p1; .bashrc should run but it
doesn't. This leads me to believe that OpenSSH is the culprit.

Interactive login sessions work fine; bash runs .bash_profile as per
the INVOCATION section. Also works fine with older versions of OpenSSH.

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs