rxservice(1M) rxservice(1M)
NAME
rxservice - add or remove an REXEC service
SYNOPSIS
rxservice -a servicename [-d description] [-u] servicedef
rxservice -r servicename...
rxservice -l
DESCRIPTION
The rxservice command provides an administrator with a way of
adding and removing REXEC services.
Files
/etc/rexec/services REXEC services database
USAGE
The following options are available to the rxservice command:
-a servicename
Add an REXEC service. servicename is the name of the
REXEC service being defined. Users on a client machine
invoke the service via the service name. The service
name is restricted to 14 characters and must be
alphanumeric.
-d description
A text description (up to 256 characters in length) that
describes the service.
-u Specifies that a utmp entry is to be made on the remote
host containing the mapped user's login name.
servicedef
A service definition, consisting of a character string
composed of the command (with parameters) that is
executed when the service is invoked. The command must
be a full path name. The parameters are parsed as
tokens separated by white space, tokens enclosed in
double quote (") characters, or tokens enclosed in
single quote (') characters. If the double quote or
single quote character is to be interpreted literally,
it must be preceded by a backslash (\) character. If a
token is enclosed in single quote characters, then every
character of that token is interpreted literally. If
you need to use a quote in the service definition, use a
different one than is used in the service argument. For
Copyright 1994 Novell, Inc. Page 1
rxservice(1M) rxservice(1M)
example, if you use double quotes in the service
argument, use single quotes in the service definition.
The character string is limited to 256 characters. The
command line is interpreted first by the shell, then by
rxservice, and then by the remote shell.
-r servicename
Remove one or more REXEC services. servicename is the
name of the service or services to be deleted.
-l Displays the contents of the services file.
The following rules apply when creating a service definition:
The service definition can take parameters from the client
machine; these parameters are referenced in the service
definition via the macros %0 for the service name, %1 for the
first parameter, %2 for the second, and so on, up to %9 for
the ninth parameter.
The parameter macros are parsed as tokens consisting of the %
character, followed immediately by a single-digit integer
representing the position of the parameter.
The special macro %* is used to reference all parameters
(except %0).
If the % character is to be interpreted literally, it must be
preceded by a backslash (\) character, be contained in a token
enclosed within single-quote characters, or be contained in an
undefined macro name.
If a service definition must reference more than nine
parameters, the %* macro can be used to pass all the
parameters to a shell script.
The REXEC facility defines the following macros, which can be
used by any service:
%m The address of the client machine.
%t The name of the transport provider used to connect to
the remote host.
%s The shell for the mapped user, obtained from the
/etc/passwd file.
Copyright 1994 Novell, Inc. Page 2
rxservice(1M) rxservice(1M)
Service definitions are required to begin with a slash (/) or
a percent (%) character.
Examples
The following defines a service called rlookup, which accesses
a local database via a command called dblook:
rxservice -a rlookup -d 'Remote database lookup' \
'/usr/bin/dblook %*'
The following defines a service called rsetup, which modifies
database tables via a local command called setdb. The setdb
command takes the address of the client machine as a
parameter.
rxservice -a rsetdb -d 'remote setup service' \
'/usr/bin/setdb %m'
REFERENCES
rexec(1), rexecve(3N), rxlist(1M)
Copyright 1994 Novell, Inc. Page 3