Do not run mandoc for lintmanpages if MANPAGES is empty.
[netbsd-mini2440.git] / libexec / rexecd / rexecd.8
blobf13529f3c72ae15eca8ed0859671c94decebb57e
1 .\"     $NetBSD: rexecd.8,v 1.11 2003/08/07 09:46:46 agc Exp $
2 .\"
3 .\" Copyright (c) 1983, 1991, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     from: @(#)rexecd.8      8.3 (Berkeley) 6/1/94
31 .\"
32 .Dd June 1, 1994
33 .Dt REXECD 8
34 .Os
35 .Sh NAME
36 .Nm rexecd
37 .Nd remote execution server
38 .Sh SYNOPSIS
39 .Nm
40 .Sh DESCRIPTION
41 .Nm
42 is the server for the
43 .Xr rexec 3
44 routine.
45 The server provides remote execution facilities with authentication
46 based on user names and passwords.
47 .Pp
48 .Nm
49 listens for service requests at the port indicated in
50 the ``exec'' service specification; see
51 .Xr services 5 .
52 When a service request is received the following protocol
53 is initiated:
54 .Bl -enum
55 .It
56 The server reads characters from the socket up to a NUL
57 .Pq Ql \e0
58 byte.
59 The resultant string is interpreted as an
60 .Tn ASCII
61 number, base 10.
62 .It
63 If the number received in step 1 is non-zero,
64 it is interpreted as the port number of a secondary
65 stream to be used for the
66 .Em stderr .
67 A second connection is then created to the specified
68 port on the client's machine.
69 .It
70 A NUL terminated user name of at most 16 characters
71 is retrieved on the initial socket.
72 .It
73 A NUL terminated, unencrypted password of at most
74 16 characters is retrieved on the initial socket.
75 .It
76 A NUL terminated command to be passed to a
77 shell is retrieved on the initial socket.
78 The length of the command is limited by the upper bound on the size
79 of the system's argument list.
80 .It
81 .Nm
82 then validates the user as is done at login time and, if the
83 authentication was successful, changes to the user's home directory,
84 and establishes the user and group protections of the user.
85 If any of these steps fail the connection is
86 aborted with a diagnostic message returned.
87 .It
88 A NUL byte is returned on the initial socket and the command line
89 is passed to the normal login shell of the user.
90 The shell inherits the network connections established by
91 .Nm .
92 .El
93 .Sh DIAGNOSTICS
94 Except for the last one listed below,
95 all diagnostic messages are returned on the initial socket,
96 after which any network connections are closed.
97 An error is indicated by a leading byte with a value of
98 1 (0 is returned in step 7 above upon successful completion
99 of all the steps prior to the command execution).
101 .Bl -tag -width Ds
102 .It Sy username too long
103 The name is
104 longer than 16 characters.
105 .It Sy password too long
106 The password is longer than 16 characters.
107 .It Sy command too long
108 The command line passed exceeds the size of the argument
109 list (as configured into the system).
110 .It Sy Login incorrect.
111 No password file entry for the user name existed.
112 .It Sy Password incorrect.
113 The wrong password was supplied.
114 .It Sy \&No remote directory.
116 .Xr chdir 2
117 to the home directory failed.
118 .It Sy Try again.
120 .Xr fork 2
121 by the server failed.
122 .It Sy \*[Lt]shellname\*[Gt]: ...
123 The user's login shell could not be started.
124 This message is returned
125 on the connection associated with the
126 .Em stderr ,
127 and is not preceded by a flag byte.
129 .Sh SEE ALSO
130 .Xr rexec 3
131 .Sh HISTORY
134 command appeared in
135 .Bx 4.2 .
136 .Sh BUGS
137 Indicating ``Login incorrect'' as opposed to ``Password incorrect''
138 is a security breach which allows people to probe a system for users
139 with null passwords.
141 A facility to allow all data and password exchanges to be encrypted should be
142 present.
143 .Sh SECURITY CONSIDERATIONS
144 As the passwords exchanged by the client and
146 are not encrypted, it is
147 .Em strongly
148 recommended that this service is not enabled.