1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)rexecd.8 8.3 (Berkeley) 06/01/94 7.\" 8.Dd 9.Dt REXECD 8 10.Os BSD 4.2 11.Sh NAME 12.Nm rexecd 13.Nd remote execution server 14.Sh SYNOPSIS 15.Nm rexecd 16.Sh DESCRIPTION 17.Nm Rexecd 18is the server for the 19.Xr rexec 3 20routine. The server provides remote execution facilities 21with authentication based on user names and 22passwords. 23.Pp 24.Nm Rexecd 25listens for service requests at the port indicated in 26the ``exec'' service specification; see 27.Xr services 5 . 28When a service request is received the following protocol 29is initiated: 30.Bl -enum 31.It 32The server reads characters from the socket up 33to a NUL 34.Pq Ql \e0 35byte. The resultant string is 36interpreted as an 37.Tn ASCII 38number, base 10. 39.It 40If the number received in step 1 is non-zero, 41it is interpreted as the port number of a secondary 42stream to be used for the 43.Em stderr . 44A second connection is then created to the specified 45port on the client's machine. 46.It 47A NUL terminated user name of at most 16 characters 48is retrieved on the initial socket. 49.It 50A NUL terminated, unencrypted password of at most 5116 characters is retrieved on the initial socket. 52.It 53A NUL terminated command to be passed to a 54shell is retrieved on the initial socket. The length of 55the command is limited by the upper bound on the size of 56the system's argument list. 57.It 58.Nm Rexecd 59then validates the user as is done at login time 60and, if the authentication was successful, changes 61to the user's home directory, and establishes the user 62and group protections of the user. 63If any of these steps fail the connection is 64aborted with a diagnostic message returned. 65.It 66A NUL byte is returned on the initial socket 67and the command line is passed to the normal login 68shell of the user. The 69shell inherits the network connections established 70by 71.Nm rexecd . 72.El 73.Sh DIAGNOSTICS 74Except for the last one listed below, 75all diagnostic messages are returned on the initial socket, 76after which any network connections are closed. 77An error is indicated by a leading byte with a value of 781 (0 is returned in step 7 above upon successful completion 79of all the steps prior to the command execution). 80.Pp 81.Bl -tag -width Ds 82.It Sy username too long 83The name is 84longer than 16 characters. 85.It Sy password too long 86The password is longer than 16 characters. 87.It Sy command too long 88The command line passed exceeds the size of the argument 89list (as configured into the system). 90.It Sy Login incorrect. 91No password file entry for the user name existed. 92.It Sy Password incorrect. 93The wrong password was supplied. 94.ne 1i 95.It Sy \&No remote directory. 96The 97.Xr chdir 98command to the home directory failed. 99.It Sy Try again. 100A 101.Xr fork 102by the server failed. 103.It Sy <shellname>: ... 104The user's login shell could not be started. 105This message is returned 106on the connection associated with the 107.Em stderr , 108and is not preceded by a flag byte. 109.El 110.Sh SEE ALSO 111.Xr rexec 3 112.Sh BUGS 113Indicating ``Login incorrect'' as opposed to ``Password incorrect'' 114is a security breach which allows people to probe a system for users 115with null passwords. 116.Pp 117A facility to allow all data and password exchanges to be encrypted should be 118present. 119.Sh HISTORY 120The 121.Nm 122command appeared in 123.Bx 4.2 . 124