# phpman > man > pam_rhosts(8)

[PAM_RHOSTS(8)](https://www.chedong.com/phpMan.php/man/PAMRHOSTS/8/markdown)                             Linux-PAM Manual                             [PAM_RHOSTS(8)](https://www.chedong.com/phpMan.php/man/PAMRHOSTS/8/markdown)



## NAME
       pam_rhosts - The rhosts PAM module

## SYNOPSIS
       **pam**___**rhosts.so**

## DESCRIPTION
       This module performs the standard network authentication for services, as used by traditional
       implementations of **rlogin** and **rsh** etc.

       The authentication mechanism of this module is based on the contents of two files;
       /etc/hosts.equiv (or and ~/.rhosts. Firstly, hosts listed in the former file are treated as
       equivalent to the localhost. Secondly, entries in the user's own copy of the latter file is
       used to map "_remote-host_ _remote-user_" pairs to that user's account on the current host.
       Access is granted to the user if their host is present in /etc/hosts.equiv and their remote
       account is identical to their local one, or if their remote account has an entry in their
       personal configuration file.

       The module authenticates a remote user (internally specified by the item _PAM_RUSER_ connecting
       from the remote host (internally specified by the item **PAM**___**RHOST**). Accordingly, for
       applications to be compatible this authentication module they must set these items prior to
       calling **pam**___**authenticate()**. The module is not capable of independently probing the network
       connection for such information.

## OPTIONS
### debug
           Print debug information.

### silent
           Don't print informative messages.

       **superuser=**_account_
           Handle _account_ as root.

## MODULE TYPES PROVIDED
       Only the **auth** module type is provided.

## RETURN VALUES
       PAM_AUTH_ERR
           The remote host, remote user name or the local user name couldn't be determined or access
           was denied by .rhosts file.

       PAM_USER_UNKNOWN
           User is not known to system.

## EXAMPLES
       To grant a remote user access by /etc/hosts.equiv or .rhosts for **rsh** add the following lines
       to /etc/pam.d/rsh:

           #%PAM-1.0
           #
           auth     required       pam_rhosts.so
           auth     required       pam_nologin.so
           auth     required       pam_env.so
           auth     required       pam_unix.so



## SEE ALSO
       [**rootok**(3)](https://www.chedong.com/phpMan.php/man/rootok/3/markdown), [**hosts.equiv**(5)](https://www.chedong.com/phpMan.php/man/hosts.equiv/5/markdown), [**rhosts**(5)](https://www.chedong.com/phpMan.php/man/rhosts/5/markdown), [**pam.conf**(5)](https://www.chedong.com/phpMan.php/man/pam.conf/5/markdown), [**pam.d**(5)](https://www.chedong.com/phpMan.php/man/pam.d/5/markdown), [**pam**(7)](https://www.chedong.com/phpMan.php/man/pam/7/markdown)

## AUTHOR
       pam_rhosts was written by Thorsten Kukuk <<kukuk@thkukuk.de>>



Linux-PAM Manual                             06/08/2020                                [PAM_RHOSTS(8)](https://www.chedong.com/phpMan.php/man/PAMRHOSTS/8/markdown)
