Next | Prev | Up | Top | Contents | Index

Controlling Network Access

Three files that help you control access to a host within your network are:

/etc/hosts.equiv

A list of hosts that are considered trusted, or equivalent to you.

.rhosts

A list of hosts that are allowed access to a specific user account.

/etc/passwd

The list of system accounts and their encrypted passwords.
These three files control whether access is granted or denied when a remote host issues an rlogin(1C), rcp(1C), rdist(1C), or rsh(1C) request.

When a request for access is received, the file hosts.equiv is checked, and if the host is listed in that file, and the target user account is listed in /etc/passwd, no further checking is performed and remote access is allowed. In this case, a remote user with a local user ID has equivalent access from a remote host.

Users can expand this equivalence by listing hosts and specific accounts in .rhosts files in their home directories. The root login bypasses the /etc/hosts.equiv file and uses only the /.rhosts file in the root directory for equivalence checking. If there is an entry in the /.rhosts file for root, the root user on the remote system will have root privilege on your system. For obvious reasons, this is not a secure practice. It is much more secure to handle file transfers through a non-privileged account such as guest. Note also that a .rhosts file with a system name "localhost" allows su to work without requiring passwords. Refer to su(1M) for more information.

The owner of the .rhosts file must be either the user in whose home directory it resides, or the superuser, root. If it is owned by another user, or if the file permissions allow anyone who is not the owner of the file to modify it, the contents of a user's .rhosts file are automatically disregarded for security reasons.

You may wish to disallow use of .rhosts files altogether if connecting to an untrusted network (you can add the -l option to the rshd invocation in /etc/inetd.conf and thereby disallow these files. See rshd(1M) for more information). The more secure configurations for such connections are as discussed later in this chapter under "Network Security and Firewalls". For complete information about the /etc/hosts.equiv and .rhosts files, see the hosts.equiv(4) reference page.


Next | Prev | Up | Top | Contents | Index