[Bug 604124] New: /etc/csh.login prevents setting $PATH within passwordless hostbased authenticated non interactive sessions
http://bugzilla.novell.com/show_bug.cgi?id=604124 http://bugzilla.novell.com/show_bug.cgi?id=604124#c0 Summary: /etc/csh.login prevents setting $PATH within passwordless hostbased authenticated non interactive sessions Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: x86-64 OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: avalit@web.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20091118 SeaMonkey/1.1.18 Hi, hostbased, not interactive ssh-connections don't get a valid $PATH-Environment because /etc/csh.login compares in line 288: .. && ${TERM} == "xterm" ... Deleting this condition corrects the problem and $PATH is set proper. We use openSUSE-11.2 and /bin/tcsh as login-shell. Within an interactive ssh-connection $PATH is ok. The probleme exists only in hostbased, not interactive sessions! I think csh.login should be altered this way (Also please have a look into /etc/csh.login from opensuse-11.1!): # # An X session # if (${?TERM} && -o /dev/$tty && ${?prompt} && ! ${?SSH_TTY}) then if ( ${TERM} == "xterm" ) then echo "Directory: $cwd" # Last but not least date endif endif BTW: running "ssh -t ..." is running with the "original" SuSE-11.2-/etc/csh.login !!! I suggest sshd is sensible about touching the environmentvariable $TERM. Even the instruction echo ${TERM} >> /tmp/dummy.txt put into the csh.login changes the $PATH !!! Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
/usr/bin/ssh linpc5 printenv | grep PATH PATH=/usr/lib64/mpi/gcc/openmpi/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin MANPATH=/usr/lib64/mpi/gcc/openmpi/man:/usr/share/man:/usr/local/man:/usr/local/share/man XNLSPATH=/usr/share/X11/nls LD_LIBRARY_PATH=/usr/lib64/mpi/gcc/openmpi/lib64 /usr/bin/ssh linpc5
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c1
Andreas Wolfsgruber
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c
yang xiaoyu
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c2
Ruediger Oertel
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c3
Dr. Werner Fink
/usr/bin/ssh linpc5 printenv | grep PATH PATH=/usr/lib64/mpi/gcc/openmpi/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin MANPATH=/usr/lib64/mpi/gcc/openmpi/man:/usr/share/man:/usr/local/man:/usr/local/share/man XNLSPATH=/usr/share/X11/nls LD_LIBRARY_PATH=/usr/lib64/mpi/gcc/openmpi/lib64 /usr/bin/ssh linpc5
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c4
Andreas Wolfsgruber
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c5
Ruediger Oertel
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c6
--- Comment #6 from Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c7
Andreas Wolfsgruber
pretty sure a duplicate of bnc#560903
*** This bug has been marked as a duplicate of bug 560903 ***
Sorry, but it's not a duplicate of bug 560903. The problem is: If the environmentvariable $TERM is touched within the startup of a passwordless hostbased authenticated non interactive ssh-session, then the environmentvariable $PATH gets the systems searchpath-environment and not as suggested the searchpath-environment from the users settings in .tcshrc or .cshrc. In SuSE-11.1 the code in /etc/csh.login takes this into consideration using a cascaded if-construct: line 297 ff: # # An X session # if (${?TERM} && -o /dev/$tty && ${?prompt}) then if (${TERM} == "xterm") then if (! ${?SSH_TTY} ) then if ( ! -f $HOME/.hushlogin && -s /etc/motd ) cat /etc/motd echo "Directory: $cwd" # Last but not least date endif # # shadow passwd # Note: on normal console this will be done by /bin/login if ( -r /var/log/faillog ) then if ( -x /bin/faillog ) /bin/faillog if ( -x /usr/bin/faillog ) /usr/bin/faillog endif endif endif # # End of /etc/csh.login # In SuSE-11.2 the code has changed: line 285 ff: # # An X session # if (${?TERM} && -o /dev/$tty && ${?prompt} && ${TERM} == "xterm" && ! ${?SSH_TTY}) then echo "Directory: $cwd" # Last but not least date endif # # End of /etc/csh.login # -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=604124
http://bugzilla.novell.com/show_bug.cgi?id=604124#c8
Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com