xref: /csrg-svn/libexec/rexecd/rexecd.8 (revision 67329)
161437Sbostic.\" Copyright (c) 1983, 1991, 1993
261437Sbostic.\"	The Regents of the University of California.  All rights reserved.
319000Smckusick.\"
443769Strent.\" %sccs.include.redist.man%
519000Smckusick.\"
6*67329Sah.\"     @(#)rexecd.8	8.3 (Berkeley) 06/01/94
735734Sbostic.\"
847462Scael.Dd
947462Scael.Dt REXECD 8
1047462Scael.Os BSD 4.2
1147462Scael.Sh NAME
1247462Scael.Nm rexecd
1347462Scael.Nd remote execution server
1447462Scael.Sh SYNOPSIS
1547462Scael.Nm rexecd
1647462Scael.Sh DESCRIPTION
1747462Scael.Nm Rexecd
1819000Smckusickis the server for the
1947462Scael.Xr rexec 3
2019000Smckusickroutine.  The server provides remote execution facilities
2127903Slepreauwith authentication based on user names and
2219000Smckusickpasswords.
2347462Scael.Pp
2447462Scael.Nm Rexecd
2519000Smckusicklistens for service requests at the port indicated in
2619000Smckusickthe ``exec'' service specification; see
2747462Scael.Xr services 5 .
2819000SmckusickWhen a service request is received the following protocol
2919000Smckusickis initiated:
3047462Scael.Bl -enum
3147462Scael.It
3219000SmckusickThe server reads characters from the socket up
3347462Scaelto a NUL
3447462Scael.Pq Ql \e0
3547462Scaelbyte.  The resultant string is
3647462Scaelinterpreted as an
3747462Scael.Tn ASCII
3847462Scaelnumber, base 10.
3947462Scael.It
4019000SmckusickIf the number received in step 1 is non-zero,
4119000Smckusickit is interpreted as the port number of a secondary
4219000Smckusickstream to be used for the
4347462Scael.Em stderr .
4419000SmckusickA second connection is then created to the specified
4519000Smckusickport on the client's machine.
4647462Scael.It
4747462ScaelA NUL terminated user name of at most 16 characters
4819000Smckusickis retrieved on the initial socket.
4947462Scael.It
5047462ScaelA NUL terminated, unencrypted password of at most
5119000Smckusick16 characters is retrieved on the initial socket.
5247462Scael.It
5347462ScaelA NUL terminated command to be passed to a
5419000Smckusickshell is retrieved on the initial socket.  The length of
5519000Smckusickthe command is limited by the upper bound on the size of
5619000Smckusickthe system's argument list.
5747462Scael.It
5847462Scael.Nm Rexecd
5919000Smckusickthen validates the user as is done at login time
6019000Smckusickand, if the authentication was successful, changes
6119000Smckusickto the user's home directory, and establishes the user
6219000Smckusickand group protections of the user.
6319000SmckusickIf any of these steps fail the connection is
6419000Smckusickaborted with a diagnostic message returned.
6547462Scael.It
6647462ScaelA NUL byte is returned on the initial socket
6719000Smckusickand the command line is passed to the normal login
6819000Smckusickshell of the user.  The
6919000Smckusickshell inherits the network connections established
7019000Smckusickby
7147462Scael.Nm rexecd .
7247462Scael.El
7347462Scael.Sh DIAGNOSTICS
7427903SlepreauExcept for the last one listed below,
7527903Slepreauall diagnostic messages are returned on the initial socket,
7619000Smckusickafter which any network connections are closed.
7719000SmckusickAn error is indicated by a leading byte with a value of
7819000Smckusick1 (0 is returned in step 7 above upon successful completion
7919000Smckusickof all the steps prior to the command execution).
8047462Scael.Pp
8147462Scael.Bl -tag -width Ds
8247462Scael.It Sy username too long
8319000SmckusickThe name is
8419000Smckusicklonger than 16 characters.
8547462Scael.It Sy password too long
8619000SmckusickThe password is longer than 16 characters.
8747462Scael.It Sy command too long
8819000SmckusickThe command line passed exceeds the size of the argument
8919000Smckusicklist (as configured into the system).
9047462Scael.It Sy Login incorrect.
9119000SmckusickNo password file entry for the user name existed.
9247462Scael.It Sy Password incorrect.
9365103SmckusickThe wrong password was supplied.
94*67329Sah.ne 1i
9547462Scael.It Sy \&No remote directory.
9619000SmckusickThe
9747462Scael.Xr chdir
9819000Smckusickcommand to the home directory failed.
9947462Scael.It Sy Try again.
10019000SmckusickA
10147462Scael.Xr fork
10219000Smckusickby the server failed.
10347462Scael.It Sy <shellname>: ...
10419000SmckusickThe user's login shell could not be started.
10527903SlepreauThis message is returned
10627903Slepreauon the connection associated with the
10747462Scael.Em stderr ,
10827903Slepreauand is not preceded by a flag byte.
10947462Scael.El
11047462Scael.Sh SEE ALSO
11147462Scael.Xr rexec 3
11247462Scael.Sh BUGS
11319000SmckusickIndicating ``Login incorrect'' as opposed to ``Password incorrect''
11419000Smckusickis a security breach which allows people to probe a system for users
11519000Smckusickwith null passwords.
11647462Scael.Pp
11727903SlepreauA facility to allow all data and password exchanges to be encrypted should be
11819000Smckusickpresent.
11947462Scael.Sh HISTORY
12047462ScaelThe
12147462Scael.Nm
12247462Scaelcommand appeared in
12347462Scael.Bx 4.2 .
124