create errors directory if DNE
[unix-history] / usr / src / libexec / rexecd / rexecd.8
CommitLineData
8412ed9b
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
e21fbf8d 5.\" @(#)rexecd.8 6.2 (Berkeley) %G%
8412ed9b 6.\"
6931c252 7.TH REXECD 8C ""
8412ed9b
KM
8.UC 5
9.SH NAME
10rexecd \- remote execution server
11.SH SYNOPSIS
12.B /etc/rexecd
13.SH DESCRIPTION
14.I Rexecd
15is the server for the
16.IR rexec (3X)
17routine. The server provides remote execution facilities
e21fbf8d 18with authentication based on user names and
8412ed9b
KM
19passwords.
20.PP
21.I Rexecd
22listens for service requests at the port indicated in
23the ``exec'' service specification; see
24.IR services (5).
25When a service request is received the following protocol
26is initiated:
27.IP 1)
28The server reads characters from the socket up
29to a null (`\e0') byte. The resultant string is
30interpreted as an ASCII number, base 10.
31.IP 2)
32If the number received in step 1 is non-zero,
33it is interpreted as the port number of a secondary
34stream to be used for the
35.BR stderr .
36A second connection is then created to the specified
37port on the client's machine.
38.IP 3)
39A null terminated user name of at most 16 characters
40is retrieved on the initial socket.
41.IP 4)
e21fbf8d 42A null terminated, unencrypted password of at most
8412ed9b
KM
4316 characters is retrieved on the initial socket.
44.IP 5)
45A null terminated command to be passed to a
46shell is retrieved on the initial socket. The length of
47the command is limited by the upper bound on the size of
48the system's argument list.
49.IP 6)
50.I Rexecd
51then validates the user as is done at login time
52and, if the authentication was successful, changes
53to the user's home directory, and establishes the user
54and group protections of the user.
55If any of these steps fail the connection is
56aborted with a diagnostic message returned.
57.IP 7)
e21fbf8d 58A null byte is returned on the initial socket
8412ed9b
KM
59and the command line is passed to the normal login
60shell of the user. The
61shell inherits the network connections established
62by
63.IR rexecd .
64.SH DIAGNOSTICS
e21fbf8d
JL
65Except for the last one listed below,
66all diagnostic messages are returned on the initial socket,
8412ed9b
KM
67after which any network connections are closed.
68An error is indicated by a leading byte with a value of
691 (0 is returned in step 7 above upon successful completion
70of all the steps prior to the command execution).
71.PP
72.B ``username too long''
73.br
74The name is
75longer than 16 characters.
76.PP
77.B ``password too long''
78.br
79The password is longer than 16 characters.
80.PP
81.B ``command too long ''
82.br
83The command line passed exceeds the size of the argument
84list (as configured into the system).
85.PP
86.B ``Login incorrect.''
87.br
88No password file entry for the user name existed.
89.PP
90.B ``Password incorrect.''
91.br
92The wrong was password supplied.
93.PP
94.B ``No remote directory.''
95.br
96The
97.I chdir
98command to the home directory failed.
99.PP
100.B ``Try again.''
101.br
102A
103.I fork
104by the server failed.
105.PP
e21fbf8d 106.B ``<shellname>: ...''
8412ed9b
KM
107.br
108The user's login shell could not be started.
e21fbf8d
JL
109This message is returned
110on the connection associated with the
111.BR stderr ,
112and is not preceded by a flag byte.
113.SH SEE ALSO
114rexec(3X)
8412ed9b
KM
115.SH BUGS
116Indicating ``Login incorrect'' as opposed to ``Password incorrect''
117is a security breach which allows people to probe a system for users
118with null passwords.
119.PP
e21fbf8d 120A facility to allow all data and password exchanges to be encrypted should be
8412ed9b 121present.