DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

rshell(C)


rshell -- invoke a restricted shell (command interpreter)

Syntax

rshell [ flags ] [ name [ arg1 ... ] ]

Description

rshell is a restricted version of the standard command interpreter, sh(C). 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 rshell are identical to those of sh, except that changing directory with cd, setting the value of $PATH, using command names containing slashes, and redirecting output using > and >> are all disallowed.

When invoked with the name -rshell, rshell reads the user's .profile (from $HOME/.profile). It acts as the standard 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 .profile is interpreted.

When a command to be executed is found to be a shell procedure, rshell invokes sh to execute it. Thus, it is possible to provide shell procedures to the end user that have access to the full power of the standard shell, while restricting the user to a limited menu of commands; this scheme assumes that the end user does not have write and execute permissions in the same directory.

The net effect of these rules is that the writer of the .profile has complete control over user actions, by performing guaranteed setup actions, then leaving the user in an appropriate directory (probably not the login directory).

rshell is actually just a link to sh and any flags arguments are the same as for sh.

The system administrator often sets up a directory of commands that can be safely invoked by rshell.

See also

profile(M), sh(C)

Standards conformance

rshell is conformant with AT&T SVID Issue 2.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005