Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

REXECD(8)

NAME

rexecd − remote execution server

USAGE

/etc/rexecd

DESCRIPTION

Rexecd is the server for the rexec(3X) routine.  The server allows remote execution of commands; it authorizes execution by means of usernames and encrypted passwords. 

Rexecd listens for service requests at the port indicated in the “exec” service specification.  When a service request is received, the following protocol is initiated:

1)The server reads characters from the socket up to a null (‘\0’) byte.  This string is interpreted as an ASCII number in base 10. 

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

3)The server retrieves a null-terminated username (maximum 16 characters) from the first socket. 

4)The server then retrieves a null-terminated, encrypted password (maximum 16 characters) from the first socket. 

5)The server interprets the next string it retrieves from the first socket as a command (null-terminated).  The upper bound on the size of the system’s argument list limits the length of the command. 

6)Rexecd then validates the user, as is normally done at log-in time.  If successful, rexecd then changes to the user’s home directory, and sets the appropriate  user and group protections. 

If any of these steps fails, the connection is aborted and a diagnostic message is returned. 

7)The server returns a null byte on the connection associated with stderr and the command line is passed to the user’s normal log-in Shell.  The Shell inherits the network connections established by rexecd. 

NOTES

Indicating “Login incorrect” as opposed to “Password incorrect” is a weakness that allows people to probe a system for users with no passwords. 

DIAGNOSTICS

All diagnostic messages are returned on the connection associated with the stderr, after which any network connections are closed. An error is indicated by a leading byte with a value of 1 (zero is returned in step 7 above, upon successful completion of all the steps prior to the command execution).

username too long
The name is longer than 16 characters.

password too long
The password is longer than 16 characters.

command too long
The command line passed exceeds the size of the argument list (as configured into the system).

Login incorrect. 
No password file entry for the username exists.

Password incorrect. 
An incorrect password was supplied.

No remote directory. 
The chdir command to the home directory failed. 

Try again. 
A fork by the server failed. 

/bin/sh: ... 
The user’s log-in Shell could not be started.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026