Bug 1171 - rsh won't run /etc/profile script when running program
Summary: rsh won't run /etc/profile script when running program
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rsh
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-02-15 15:33 UTC by kenc
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-04-09 18:42:44 UTC
Embargoed:


Attachments (Terms of Use)

Description kenc 1999-02-15 15:33:45 UTC
using rsh to run a program on a remote system is awkward
because the user shell is run in nonlogin, noninteractive
mode, which means it never executes /etc/profile which
usually means the $PATH variable is not set up.  Interesting
enough it runs just fine when rsh is used to simply bring up
an intereactive shell.  First observed when running between
two machines, but problem can be demonstrated on single
machine by rshing to itself.

rsh localhost
brings up a shell that has everything setup properly.

rsh localhost "echo $PATH"
shows only the default user/bin:/bin path.

I have worked around this by having the /etc/bashrc script
invoke the /etc/profile script if it hasn't been run yet.
But that really shouldn't be necessary.

Comment 1 Jeff Johnson 1999-04-09 18:42:59 UTC
This is actually a bash (started up by rsh) problem.
The behavior is annoying, but well known (and well documented).

Comment 2 vallon 1999-04-21 05:16:59 UTC
This is actually the standard behavior of rsh (rshd).  If given a
command, rsh(d) executes the command directly, without running a login
shell.  If not given a command, rsh reverts to rlogin(d), which in
turn runs a login shell which, for bash, runs /etc/profile and
~/.bash_profile.


Note You need to log in before you can comment on or make changes to this bug.