NFS Services Administrator's Guide
Configuring and Using the Remote Execution Facility (REX)
How REX Works
Chapter 7 281
How REX Works
1. A user issues the on command, specifying a command to execute and
the name of a remote host on which to execute it.
The user must be logged in as a non-root user (a user with a non-zero
user ID) to use the on command. Also, an account with the user’s
local user ID must exist on the remote host.
2. The on command passes the user’s environment variables to the
remote host. If the command is interactive, the on command also
passes some of the user’s tty settings to the remote host. Note that
the user’s environment and tty settings on the remote system will
not be identical to those on the user’s home system.
3. The rexd daemon running on the remote host NFS-mounts the user’s
current working directory on the remote host, if it is not already
mounted there.
By default, rexd mounts the user’s current working directory under
/var/spool/rexd/rexdAXXXX/current_directory, where AXXXX is
a letter followed by a four-digit number, and current_directory is
the full pathname of the user’s current working directory on the local
system.
4. The command that the user specified with the on command is
executed on the remote host (the REX server). If the user did not
specify a command to execute, a shell is started on the REX server.
5. After the command has executed on the REX server, rexd unmounts
the user’s current working directory. If the directory is busy, rexd
will not be able to unmount it.
For more information on REX, type man 1M rexd or man 1 on at the
HP-UX prompt.