Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-04-09 18:42:44 UTC


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.