SysIII/usr/src/man/man1/rsh.1

Compare this file to the similar file:
Show the results in this format:

.TH RSH 1
.SH NAME
rsh \- restricted shell (command interpreter)
.SH SYNOPSIS
.B rsh
[ flags ]
[ name [ arg1 ... ] ]
.SH DESCRIPTION
.I Rsh\^
is a restricted version of the standard command interpreter
.IR sh (1).
It is used to set up login names and execution environments whose
capabilities are more controlled than those of the standard shell.
The actions of
.I rsh\^
are identical to those of
.IR sh ,
except that the following are disallowed:
.RS
.PP
.I cd\^
.br
setting the value of
.SM
.B $PATH
.br
command names containing
.B /
.br
.B >
and
.B >>
.RE
.PP
When invoked with the name
.BR \-rsh ,
.I rsh\^
reads the user's \f3.profile\fP (from \f3\s-1$HOME\s+1/.profile\fP).
It acts as the standard
.I sh\^
while doing this,
except that an interrupt causes an immediate exit,
instead of causing a return to command level.
The restrictions above are enforced
after \f3.profile\fP is interpreted.
.PP
When a command to be executed is found to be a shell procedure,
.I rsh\^
invokes
.I sh\^
to execute it.
Thus, it is possible to provide to the end user shell procedures 
that have access to the full power of
the standard shell,
while restricting him to a limited menu of commands;
this scheme assumes that the end user does not have write and
execute permissions in the same directory.
.PP
The net effect of these rules is that the writer of the
.B .profile
has complete control over user actions,
by performing guaranteed setup actions,
then leaving the user in an appropriate directory
(probably
.I not\^
the login directory).
.PP
.I Rsh\^
is actually just a link to
.I sh\^
and any
.I flags\^
arguments are the same as for
.IR sh (1).
.PP
The system administrator often sets up a directory
of commands that can be safely invoked by
.IR rsh .
Some systems also provide a restricted editor
.IR red .
.SH SEE ALSO
sh(1), profile(5).