Name

rexecd

Synopsis

rexecd command-line

Description

TCP/IP command. Server for the rexec routine, providing remote execution facilities with authentication based on usernames and passwords. rexecd is started by inetd and must have an entry in inetd’s configuration file, /etc/inetd.conf. When rexecd receives a service request, the following protocol is initiated:

  1. The server reads characters from the socket up to a null byte. The resulting string is interpreted as an ASCII number, base 10.

  2. If the number received in step 1 is nonzero, it is interpreted as the port number of a secondary stream to be used for stderr. A second connection is then created to the specified port on the client’s machine.

  3. A null-terminated username of at most 16 characters is retrieved on the initial socket.

  4. A null-terminated, unencrypted password of at most 16 characters is retrieved on the initial socket.

  5. A null-terminated command to be passed to a shell is retrieved on the initial socket. The length of the command is limited by the upper bound on the size of the system’s argument list.

  6. rexecd then validates the user, as is done at login time and, if the authentication was successful, changes to the user’s home directory and establishes the user and group protections of the user.

  7. A null byte is returned on the connection associated with stderr, and the command line is passed to the normal login shell of the user. The shell inherits the network connections established by rexecd.

Diagnostics

Username too long

Name ...

Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.