1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. Neither the name of the University nor the names of its contributors 13.\" may be used to endorse or promote products derived from this software 14.\" without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" $FreeBSD$ 29.\" 30.Dd December 25, 2013 31.Dt HOSTS.EQUIV 5 32.Os 33.Sh NAME 34.Nm hosts.equiv , 35.Nm .rhosts 36.Nd trusted remote host and user name data base 37.Sh DESCRIPTION 38The 39.Nm 40and 41.Nm .rhosts 42files contain information regarding 43trusted hosts and users on the network. 44For each host a single line should be present 45with the following information: 46.Pp 47simple 48.Bd -unfilled -offset indent 49hostname [username] 50.Ed 51.Pp 52or the more verbose 53.Bd -unfilled -offset indent 54[+-][hostname|@netgroup] [[+-][username|@netgroup]] 55.Ed 56.Pp 57A 58.Dq @ 59indicates a host by netgroup or user by netgroup. 60A single 61.Dq + 62matches all hosts or users. 63A host name with a leading 64.Dq - 65will reject 66all matching hosts and all their users. 67A user name with leading 68.Dq - 69will reject all matching users from matching hosts. 70.Pp 71Items are separated by any number of blanks and/or 72tab characters. 73A 74.Dq # 75indicates the beginning of 76a comment; characters up to the end of the line are 77not interpreted by routines which search the file. 78.Pp 79Host names are specified in the conventional Internet DNS 80dotted-domains 81.Dq .\& 82(dot) notation using the 83.Xr inet_addr 3 84routine 85from the Internet address manipulation library, 86.Xr inet 3 . 87Host names may contain any printable 88character other than a field delimiter, newline, 89or comment character. 90.Pp 91For security reasons, a user's 92.Nm .rhosts 93file will be ignored if it is not a regular file, or if it 94is not owned by the user, or 95if it is writable by anyone other than the user. 96.Sh FILES 97.Bl -tag -width /etc/hosts.equivxxx -compact 98.It Pa /etc/hosts.equiv 99The 100.Nm 101file resides in 102.Pa /etc . 103.It Pa $HOME/.rhosts 104.Nm .rhosts 105file resides in 106.Pa $HOME . 107.El 108.Sh EXAMPLES 109.Dl bar.com foo 110.Pp 111Trust user 112.Dq foo 113from host 114.Dq bar.com . 115.Pp 116.Dl +@allclient 117.Pp 118Trust all hosts from netgroup 119.Dq allclient . 120.Pp 121.Dl +@allclient -@dau 122.Pp 123Trust all hosts from netgroup 124.Dq allclient 125and their users 126except users from netgroup 127.Dq dau . 128.Sh SEE ALSO 129.Xr rcp 1 , 130.Xr rlogin 1 , 131.Xr rsh 1 , 132.Xr gethostbyname 3 , 133.Xr inet 3 , 134.Xr innetgr 3 , 135.Xr ruserok 3 , 136.Xr netgroup 5 , 137.Xr ifconfig 8 , 138.Xr yp 8 139.Sh BUGS 140This manual page is incomplete. 141For more information read 142the source in 143.Pa src/lib/libc/net/rcmd.c 144or the SunOS manual page. 145