PAM_RHOSTS(8) Linux-PAM Manual PAM_RHOSTS(8)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), hosts.equiv(5), rhosts(5), pam.conf(5), pam.d(5), pam(7)AUTHOR
pam_rhosts was written by Thorsten Kukuk <kukuk@thkukuk.de>
Linux-PAM Manual 06/04/2011 PAM_RHOSTS(8)
Check Out this Related Man Page
HOSTS.EQUIV(5) BSD File Formats Manual HOSTS.EQUIV(5)NAME
hosts.equiv, .rhosts -- trusted remote hosts and host-user pairs
DESCRIPTION
The hosts.equiv and .rhosts files list hosts and users which are ``trusted'' by the local host when a connection is made via rlogind(8),
rshd(8), or any other server that uses ruserok(3). This mechanism bypasses password checks, and is required for access via rsh(1).
Each line of these files has the format:
hostname [username]
The hostname may be specified as a host name (typically a fully qualified host name in a DNS environment) or address, +@netgroup (from which
only the host names are checked), or a ``+'' wildcard (allow all hosts).
The username, if specified, may be given as a user name on the remote host, +@netgroup (from which only the user names are checked), or a
``+'' wildcard (allow all remote users).
If a username is specified, only that user from the specified host may login to the local machine. If a username is not specified, any user
may login with the same user name.
EXAMPLES
somehost
A common usage: users on somehost may login to the local host as the same user name.
somehost username
The user username on somehost may login to the local host. If specified in /etc/hosts.equiv, the user may login with only the same
user name.
+@anetgroup username
The user username may login to the local host from any machine listed in the netgroup anetgroup.
+
+ +
Two severe security hazards. In the first case, allows a user on any machine to login to the local host as the same user name. In the
second case, allows any user on any machine to login to the local host (as any user, if in /etc/hosts.equiv).
WARNINGS
The username checks provided by this mechanism are not secure, as the remote user name is received by the server unchecked for validity.
Therefore this mechanism should only be used in an environment where all hosts are completely trusted.
A numeric host address instead of a host name can help security considerations somewhat; the address is then used directly by iruserok(3).
When a username (or netgroup, or +) is specified in /etc/hosts.equiv, that user (or group of users, or all users, respectively) may login to
the local host as any local user. Usernames in /etc/hosts.equiv should therefore be used with extreme caution, or not at all.
A .rhosts file must be owned by the user whose home directory it resides in, and must be writable only by that user.
Logins as root only check root's .rhosts file; the /etc/hosts.equiv file is not checked for security. Access permitted through root's
.rhosts file is typically only for rsh(1), as root must still login on the console for an interactive login such as rlogin(1).
FILES
/etc/hosts.equiv Global trusted host-user pairs list
~/.rhosts Per-user trusted host-user pairs list
SEE ALSO rcp(1), rlogin(1), rsh(1), rcmd(3), ruserok(3), netgroup(5)HISTORY
The .rhosts file format appeared in 4.2BSD.
BUGS
The ruserok(3) implementation currently skips negative entries (preceded with a ``-'' sign) and does not treat them as ``short-circuit'' neg-
ative entries.
BSD November 26, 1997 BSD