Initial import from FreeBSD RELENG_4:
[games.git] / crypto / kerberosIV / man / rlogind.8
1 .\" Copyright (c) 1983, 1989, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)rlogind.8   8.1 (Berkeley) 6/4/93
33 .\"
34 .Dd August 25, 1996
35 .Dt RLOGIND 8
36 .Os BSD 4.2
37 .Sh NAME
38 .Nm rlogind
39 .Nd remote login server
40 .Sh SYNOPSIS
41 .Nm rlogind
42 .Op Fl ailnkvxD
43 .Op Fl p Ar portnumber
44 .Op Fl L Ar /bin/login
45 .Sh DESCRIPTION
46 .Nm Rlogind
47 is the server for the 
48 .Xr rlogin 1
49 program.  The server provides a remote login facility with
50 kerberos-based authentication or traditional pseudo-authentication with
51 privileged port numbers from trusted hosts.
52 .Pp
53 Options supported by
54 .Nm rlogind :
55 .Bl -tag -width Ds
56 .It Fl a
57 No-op.  For backwards compatibility.  Hostnames are always verified.
58 .It Fl l
59 Prevent any authentication based on the user's
60 .Dq Pa .rhosts
61 file, unless the user is logging in as the superuser.
62 .It Fl n
63 Disable keep-alive messages.
64 .It Fl k
65 Enable kerberos authentication.
66 .It Fl i
67 Do not expect to be spawned by inetd and create a socket and listen on
68 it yourself.
69 .It Fl p portnumber
70 Specifies the port number it should listen on in case the
71 .It Fl i
72 flag has been given.
73 .It Fl v
74 Vacuous, echo "Remote host requires Kerberos authentication" and exit.
75 .It Fl x
76 Provides an encrypted communications channel.  This options requires the
77 .Fl k
78 flag.
79 .It Fl L pathname
80 Specify pathname to an alternative login program.
81 .It Fl D
82 Use the TCP nodelay option (see setsockopt(2)).
83 .El
84 .Pp
85 When a service request is received,
86 .Nm rlogind
87 verifies the kerberos ticket supplied by the user.
88 .Pp
89 For non-kerberised connections, the following protocol is initiated:
90 .Bl -enum
91 .It
92 The server checks the client's source port.
93 If the port is not in the range 512-1023, the server
94 aborts the connection.
95 .It
96 The server checks the client's source address
97 and requests the corresponding host name (see
98 .Xr gethostbyaddr 3 ,
99 .Xr hosts 5
100 and
101 .Xr named 8 ) .
102 If the hostname cannot be determined,
103 the dot-notation representation of the host address is used.
104 The addresses for the hostname are requested,
105 verifying that the name and address correspond.
106 Normal authentication is bypassed if the address verification fails.
107 .El
108 .Pp
109 Once the source port and address have been checked, 
110 .Nm rlogind
111 proceeds with the authentication process described in
112 .Xr rshd 8 .
113 .Pp
114 It then allocates a pseudo terminal (see 
115 .Xr pty 4 ) ,
116 and manipulates file descriptors so that the slave
117 half of the pseudo terminal becomes the 
118 .Em stdin ,
119 .Em stdout ,
120 and
121 .Em stderr
122 for a login process.
123 The login process is an instance of the
124 .Xr login 1
125 program, invoked with the
126 .Fl f
127 option if authentication has succeeded.
128 If automatic authentication fails, the user is
129 prompted to log in as if on a standard terminal line.
130 .Pp
131 The parent of the login process manipulates the master side of
132 the pseudo terminal, operating as an intermediary
133 between the login process and the client instance of the
134 .Xr rlogin
135 program.  In normal operation, the packet protocol described
136 in
137 .Xr pty 4
138 is invoked to provide
139 .Ql ^S/^Q
140 type facilities and propagate
141 interrupt signals to the remote programs.  The login process
142 propagates the client terminal's baud rate and terminal type,
143 as found in the environment variable,
144 .Ql Ev TERM ;
145 see
146 .Xr environ 7 .
147 The screen or window size of the terminal is requested from the client,
148 and window size changes from the client are propagated to the pseudo terminal.
149 .Pp
150 Transport-level keepalive messages are enabled unless the
151 .Fl n
152 option is present.
153 The use of keepalive messages allows sessions to be timed out
154 if the client crashes or becomes unreachable.
155 .Sh DIAGNOSTICS
156 All initial diagnostic messages are indicated
157 by a leading byte with a value of 1,
158 after which any network connections are closed.
159 If there are no errors before
160 .Xr login
161 is invoked, a null byte is returned as in indication of success.
162 .Bl -tag -width Ds
163 .It Sy Try again.
164 A
165 .Xr fork
166 by the server failed.
167 .El
168 .Sh SEE ALSO
169 .Xr login 1 ,
170 .Xr ruserok 3 ,
171 .Xr rshd 8
172 .Sh BUGS
173 A more extensible protocol should be used.
174 .Sh HISTORY
175 The
176 .Nm
177 command appeared in
178 .Bx 4.2 .