1 IN.RLOGIND(1M)               Maintenance Commands               IN.RLOGIND(1M)
   2 
   3 NAME
   4        in.rlogind, rlogind - remote login server
   5 
   6 SYNOPSIS
   7        /usr/sbin/in.rlogind [-k5eExXciPp] [-s tos] [-S keytab]
   8             [-M realm]
   9 
  10 
  11 DESCRIPTION
  12        in.rlogind is the server for the rlogin(1) program.  The server
  13        provides a remote login facility with authentication based on Kerberos
  14        V5 or privileged port numbers.
  15 
  16 
  17        in.rlogind is invoked by inetd(1M) when a remote login connection is
  18        established. When Kerberos V5 authentication is required (see option -k
  19        below), the authentication sequence is as follows:
  20 
  21            o      Check Kerberos V5 authentication.
  22 
  23            o      Check authorization according to the rules in
  24                   krb5_auth_rules(5).
  25 
  26            o      Prompt for a password if any checks fail and /etc/pam.conf
  27                   is configured to do so.
  28 
  29 
  30        In order for Kerberos authentication to work, a host/<FQDN> Kerberos
  31        principal must exist for each Fully Qualified Domain Name associated
  32        with the in.rlogind server. Each of these host/<FQDN> principals   must
  33        have a keytab entry in the /etc/krb5/krb5.keytab file on the in.rlogind
  34        server. An example principal might be:
  35 
  36 
  37        host/bigmachine.eng.example.com
  38 
  39 
  40        See kadmin(1M) for instructions on adding a principal to a krb5.keytab
  41        file. See  for a discussion of Kerberos authentication.
  42 
  43 
  44        If Kerberos V5 authentication is not enabled, then the authentication
  45        procedure follows the standard rlogin protocol:
  46 
  47            o      The server checks the client's source port. If the port is
  48                   not in the range 512-1023, the server aborts the connection.
  49 
  50            o      The server checks the client's source address. If an entry
  51                   for the client exists in both /etc/hosts and
  52                   /etc/hosts.equiv, a user logging in from the client is not
  53                   prompted for a password. If the address is associated with a
  54                   host for which no corresponding entry exists in /etc/hosts,
  55                   the user is prompted for a password, regardless of  whether
  56                   or not an entry for the client is present in
  57                   /etc/hosts.equiv. See hosts(4) and hosts.equiv(4).
  58 
  59 
  60        Once the source port and address have been checked, in.rlogind
  61        allocates a pseudo-terminal and manipulates file descriptors so that
  62        the subsidiary half of the pseudo-terminal becomes the stdin, stdout,
  63        and stderr for a login process.  The login process is an instance of
  64        the login(1) program, invoked with the -r.
  65 
  66 
  67        The login process then proceeds with the pam(3PAM) authentication
  68        process. See SECURITY below.  If automatic authentication fails, it
  69        reprompts the user to login.
  70 
  71 
  72        The parent of the login process manipulates the manager side of the
  73        pseudo-terminal, operating as an intermediary between the login process
  74        and the client instance of the rlogin program.  In normal operation, a
  75        packet protocol is invoked to provide Ctrl-S and Ctrl-Q type facilities
  76        and propagate interrupt signals to the remote programs. The login
  77        process propagates the client terminal's baud rate and terminal type,
  78        as found in the environment variable, TERM.
  79 
  80 OPTIONS
  81        The following options are supported:
  82 
  83        -5
  84                     Same as -k, for backwards compatibility.
  85 
  86 
  87        -c
  88                     Requires Kerberos V5 clients to present a cryptographic
  89                     checksum of initial connection information like the name
  90                     of the user that the client is  trying  to access in the
  91                     initial authenticator. This checksum provides additionl
  92                     security by preventing an attacker from changing the
  93                     initial connection information.  This option is mutually
  94                     exclusive with the -i option.
  95 
  96 
  97        -e
  98                     Creates an encrypted session.
  99 
 100 
 101        -E
 102                     Same as -e, for backwards compatibility.
 103 
 104 
 105        -i
 106                     Ignores authenticator checksums if provided. This option
 107                     ignores authenticator checksums presented by current
 108                     Kerberos clients to protect initial connection
 109                     information. Option -i is the opposite of option -c.
 110 
 111 
 112        -k
 113                     Allows Kerberos V5 authentication with the .k5login access
 114                     control file to be trusted. If this authentication system
 115                     is used by the client and the authorization check is
 116                     passed, then the user is allowed to log in.
 117 
 118 
 119        -M realm
 120                     Uses the indicated Kerberos V5 realm. By default, the
 121                     daemon will determine its realm from the settings in the
 122                     krb5.conf(4) file.
 123 
 124 
 125        -p
 126                     Prompts for authentication only if other authentication
 127                     checks fail.
 128 
 129 
 130        -P
 131                     Prompts for a password in addition to other authentication
 132                     methods.
 133 
 134 
 135        -s tos
 136                     Sets the IP TOS option.
 137 
 138 
 139        -S keytab
 140                     Sets the KRB5 keytab file to use. The
 141                     /etc/krb5/krb5.keytab file is used by default.
 142 
 143 
 144        -x
 145                     Same as -e, for backwards compatibility.
 146 
 147 
 148        -X
 149                     Same as -e, for backwards compatibility.
 150 
 151 
 152 USAGE
 153        rlogind and in.rlogind are IPv6-enabled. See ip6(7P).  IPv6 is not
 154        currently supported with Kerberos V5 authentication.
 155 
 156 
 157        Typically, Kerberized rlogin service runs on port 543 (klogin) and
 158        Kerberized, encrypted rlogin service runs on port 2105 (eklogin). The
 159        corresponding FMRI entries are:
 160 
 161          svc:/network/login:klogin (rlogin with kerberos)
 162          svc:/network/login:eklogin (rlogin with kerberos and encryption)
 163 
 164 
 165 
 166 SECURITY
 167        in.rlogind uses pam(3PAM) for authentication, account management, and
 168        session management. The PAM configuration policy, listed through
 169        /etc/pam.conf, specifies the modules to be used for in.rlogind.  Here
 170        is a partial pam.conf file with entries for the rlogin command using
 171        the "rhosts" and UNIX authentication modules, and the UNIX account,
 172        session management, and password management modules.
 173 
 174 
 175 
 176 
 177        rlogin   auth sufficient    pam_rhosts_auth.so.1
 178        rlogin   auth requisite     pam_authtok_get.so.1
 179        rlogin   auth required      pam_dhkeys.so.1
 180        rlogin   auth required      pam_unix_auth.so.1
 181 
 182        rlogin   account required   pam_unix_roles.so.1
 183        rlogin   account required   pam_unix_projects.so.1
 184        rlogin   account required   pam_unix_account.so.1
 185 
 186        rlogin   session required   pam_unix_session.so.1
 187 
 188 
 189 
 190        With this configuration, the server checks the client's source address.
 191        If an entry for the client exists in both /etc/hosts and
 192        /etc/hosts.equiv, a user logging in from the client is not prompted for
 193        a password. If the address is associated with a host for which no
 194        corresponding entry exists in /etc/hosts, the user is prompted for a
 195        password, regardless of whether or not an entry for the client is
 196        present in /etc/hosts.equiv. See hosts(4) and hosts.equiv(4).
 197 
 198 
 199        When running a Kerberized rlogin service (with or without the
 200        encryption option), the pam service name that should be used is
 201        "krlogin".
 202 
 203 
 204        If there are no entries for the rlogin service, then the entries for
 205        the "other" service will be used. If multiple authentication modules
 206        are listed, then the user may be prompted for multiple passwords.
 207        Removing the pam_rhosts_auth.so.1 entry will disable the
 208        /etc/hosts.equiv and ~/.rhosts authentication protocol and the user
 209        would always be forced to type the password. The sufficient flag
 210        indicates that authentication through the pam_rhosts_auth.so.1 module
 211        is sufficient to authenticate the user. Only if this authentication
 212        fails is the next authentication module used.
 213 
 214 SEE ALSO
 215        login(1), svcs(1), rlogin(1), in.rshd(1M), inetadm(1M), inetd(1M),
 216        kadmin(1M), svcadm(1M), pam(3PAM), hosts(4), hosts.equiv(4),
 217        krb5.conf(4), pam.conf(4), attributes(5), environ(5),
 218        krb5_auth_rules(5), pam_authtok_check(5), pam_authtok_get(5),
 219        pam_authtok_store(5), pam_dhkeys(5), pam_passwd_auth(5),
 220        pam_unix_account(5), pam_unix_auth(5), pam_unix_session(5), smf(5)
 221 
 222 
 223 
 224 DIAGNOSTICS
 225        All diagnostic messages are returned on the connection associated with
 226        the stderr, after which any network connections are closed. An error is
 227        indicated by a leading byte with a value of 1.
 228 
 229        Hostname for your address unknown.
 230 
 231            No entry in the host name database existed for the client's
 232            machine.
 233 
 234 
 235        Try again.
 236 
 237            A fork by the server failed.
 238 
 239 
 240        /usr/bin/sh: ...
 241 
 242            The user's login shell could not be started.
 243 
 244 
 245 NOTES
 246        The authentication procedure used here assumes the integrity of each
 247        client machine and the connecting medium.  This is insecure, but it is
 248        useful in an ``open'' environment.
 249 
 250 
 251        A facility to allow all data exchanges to be encrypted should be
 252        present.
 253 
 254 
 255        The pam_unix(5) module is no longer supported. Similar functionality is
 256        provided by pam_authtok_check(5), pam_authtok_get(5),
 257        pam_authtok_store(5), pam_dhkeys(5), pam_passwd_auth(5),
 258        pam_unix_account(5), pam_unix_auth(5), and pam_unix_session(5).
 259 
 260 
 261        The in.rlogind service is managed by the service management facility,
 262        smf(5), under the service identifier:
 263 
 264          svc:/network/login:rlogin (rlogin)
 265          svc:/network/login:klogin (rlogin with kerberos)
 266          svc:/network/login:eklogin (rlogin with kerberos and encryption)
 267 
 268 
 269 
 270 
 271        Administrative actions on this service, such as enabling, disabling, or
 272        requesting restart, can be performed using svcadm(1M). Responsibility
 273        for initiating and restarting this service is delegated to inetd(1M).
 274        Use inetadm(1M) to make configuration changes and to view configuration
 275        information for this service. The service's status can be queried using
 276        the svcs(1) command.
 277 
 278                                February 5, 2022                 IN.RLOGIND(1M)