Manpage of HOSTS.EQUIV
HOSTS.EQUIVSection: Linux Programmer's Manual (5)
NAMEhosts.equiv - list of hosts and users that are granted "trusted" rcommand access to your system
DESCRIPTIONThe file /etc/hosts.equivallows or denies hosts and users to use the r-commands (e.g., rlogin, rsh, or rcp) without supplying a password.
The file uses the following format:
- +|[-]hostname|+@netgroup|-@netgroup [+|[-]username|+@netgroup|-@netgroup]
The hostnameis the name of a host which is logically equivalent to the local host. Users logged into that host are allowed to access like-named user accounts on the local host without supplying a password. The hostnamemay be (optionally) preceded by a plus (+) sign. If the plus sign is used alone, it allows any host to access your system. You can explicitly deny access to a host by preceding the hostnameby a minus (-) sign. Users from that host must always supply additional credentials, including possibly a password. For security reasons you should always use the FQDN of the hostname and not the short hostname.
The usernameentry grants a specific user access to all user accounts (except root) without supplying a password. That means the user is NOT restricted to like-named accounts. The usernamemay be (optionally) preceded by a plus (+) sign. You can also explicitly deny access to a specific user by preceding the usernamewith a minus (-) sign. This says that the user is not trusted no matter what other entries for that host exist.
Netgroups can be specified by preceding the netgroup by an @ sign.
NOTESSome systems will honor the of this file only when it has owner root and no write permission for anybody else. Some exceptionally paranoid systems even require that there be no other hard links to the file.
Modern systems use the Pluggable Authentication Modules library (PAM). With PAM a standalone plus sign is considered a wildcard character which means "any host" only when the word promiscuousis added to the auth component line in your PAM file for the particular service (e.g., rlogin).
EXAMPLEBelow are some example /etc/host.equivor ~/.rhostsfiles.
Allow any user to log in from any host:
Allow any user from hostwith a matching local account to log in:
Note: the use of +hostis never a valid syntax, including attempting to specify that any user from the host is allowed.
Allow any user from hostto log in:
Note: this is distinct from theexample since it does not require a matching local account.
Allow userfrom hostto log in as any non-root user:
Allow all users with matching local accounts from hostto log in except for baduser:
Deny all users from host:
Note: the use of -host -useris never a valid syntax, including attempting to specify that a particular user from the host is not trusted.
Allow all users with matching local accounts on all hosts in a netgroup:
Disallow all users on all hosts in a netgroup:
Allow all users in a netgroupto log in from hostas any non-root user:
Allow all users with matching local accounts on all hosts in a netgroupexcept baduser:
SEE ALSOrhosts(5), rlogind(8), rshd(8)
This document was created by man2html, using the manual pages.
Time: 16:30:30 GMT, March 14, 2017 Click Here!