]> granicus.if.org Git - linux-pam/blob - doc/modules/pam_rhosts.sgml
Relevant BUGIDs: 124388
[linux-pam] / doc / modules / pam_rhosts.sgml
1 <!--
2    $Id$
3    
4    This file was written by Andrew G. Morgan <morgan@parc.power.net>
5 -->
6
7 <sect1>The rhosts module
8
9 <sect2>Synopsis
10
11 <p>
12 <descrip>
13
14 <tag><bf>Module Name:</bf></tag>
15 <tt/pam_rhosts_auth/
16
17 <tag><bf>Author:</bf></tag>
18 Al Longyear &lt;longyear@netcom.com&gt;
19
20 <tag><bf>Maintainer:</bf></tag>
21
22 <tag><bf>Management groups provided:</bf></tag>
23 authentication
24
25 <tag><bf>Cryptographically sensitive:</bf></tag>
26         
27 <tag><bf>Security rating:</bf></tag>
28
29 <tag><bf>Clean code base:</bf></tag>
30 Clean.
31
32 <tag><bf>System dependencies:</bf></tag>
33
34 <tag><bf>Network aware:</bf></tag>
35 Standard <tt/inet_addr()/, <tt/gethostbyname()/ function calls.
36
37 </descrip>
38
39 <sect2>Overview of module
40
41 <p>
42 This module performs the standard network authentication for services,
43 as used by traditional implementations of <em/rlogin/ and <em/rsh/
44 etc.
45
46 <sect2>Authentication component
47
48 <p>
49 <descrip>
50
51 <tag><bf>Recognized arguments:</bf></tag>
52 <tt/no_hosts_equiv/; <tt/no_rhosts/; <tt/debug/; <tt/no_warn/;
53 <tt/privategroup/; <tt/promiscuous/; <tt/suppress/
54
55 <tag><bf>Description:</bf></tag>
56
57 The authentication mechanism of this module is based on the contents
58 of two files; <tt>/etc/hosts.equiv</tt> (or <tt/_PATH_HEQUIV/ in
59 <tt>#include &lt;netdb.h&gt;</tt>) and <tt>~/.rhosts</tt>.  Firstly,
60 hosts listed in the former file are treated as equivalent to the
61 localhost. Secondly, entries in the user's own copy of the latter file
62 is used to map "<tt/remote-host remote-user/" pairs to that user's
63 account on the current host. Access is granted to the user if their
64 host is present in <tt>/etc/hosts.equiv</tt> and their remote account
65 is identical to their local one, or if their remote account has an
66 entry in their personal configuration file.
67
68 <p>
69 Some restrictions are applied to the attributes of the user's personal
70 configuration file: it must be a regular file (as defined by
71 <tt/S_ISREG(x)/ of POSIX.1); it must be owned by the <em/superuser/ or
72 the user; it must not be writable by any user besides its owner.
73
74 <p>
75 The module authenticates a remote user (internally specified by the
76 item <tt/PAM_RUSER/) connecting from the remote host (internally
77 specified by the item <tt/PAM_RHOST/).  Accordingly, for applications
78 to be compatible this authentication module they must set these items
79 prior to calling <tt/pam_authenticate()/.  The module is not capable
80 of independently probing the network connection for such information.
81
82 <p>
83 In the case of <tt/root/-access, the <tt>/etc/host.equiv</tt> file is
84 <em/ignored/ unless the <tt>hosts_equiv_rootok</tt> option
85 should be used.  Instead, the superuser must have a correctly configured
86 personal configuration file.
87
88 <p>
89 The behavior of the module is modified by flags:
90 <itemize>
91 <item>
92 <tt/debug/ -
93 log more information to <tt/syslog(3)/. (XXX - actually, this module
94 does not do any logging currently, please volunteer to fix this!)
95
96 <item>
97 <tt/no_warn/ -
98 do not give verbal warnings to the user about failures etc. (XXX -
99 this module currently does not issue any warnings, please volunteer to
100 fix this!)
101
102 <item>
103 <tt/no_hosts_equiv/ -
104 ignore the contents of the <tt>/etc/hosts.equiv</tt> file.
105
106 <item>
107 <tt/hosts_equiv_rootok/ -
108 allow the use of <tt>/etc/hosts.equiv</tt> for superuser.  Without this
109 option <tt>/etc/hosts.equiv</tt> is not consulted for the superuser account.
110 This option has no effect if the <tt>no_hosts_equiv</tt> option is used.
111
112 <item>
113 <tt/no_rhosts/ -
114 ignore the contents of all user's personal configuration file
115 <tt>~/.rhosts</tt>.
116
117 <item>
118 <tt/privategroup/ -
119 normally, the <tt>~/.rhosts</tt> file must not be writable by anyone
120 other than its owner.  This option overlooks group write access in the
121 case that the group owner of this file has the same name as the
122 user being authenticated.  To lessen the security problems associated
123 with this option, the module also checks that the user is the only
124 member of their private group.
125
126 <item>
127 <tt/promiscuous/ -
128 A host entry of `+' will lead to all hosts being granted
129 access. Without this option, '+' entries will be ignored. Note, that
130 the <tt/debug/ option will syslog a warning in this latter case.
131
132 <item>
133 <tt/suppress/ -
134 This will prevent the module from <tt/syslog(3)/ing a warning message
135 when this authentication fails.  This option is mostly for keeping
136 logs free of meaningless errors, in particular when the module is used
137 with the <tt/sufficient/ control flag.
138
139 </itemize>
140 <tag><bf>Examples/suggested usage:</bf></tag>
141
142 To allow users to login from trusted remote machines, you should try
143 adding the following line to your <tt>/etc/pam.conf</tt> file
144 <em/before/ the line that would otherwise prompt the user for a
145 password:
146 <tscreen>
147 <verb>
148 #
149 # No passwords required for users from hosts listed above.
150 #
151 login  auth  sufficient  pam_rhosts_auth.so no_rhosts
152 </verb>
153 </tscreen>
154 Note, in this example, the system administrator has turned off all
155 <em/personal/ <em/rhosts/ configuration files. Also note, that this module
156 can be used to <em/only/ allow remote login from hosts specified in
157 the <tt>/etc/host.equiv</tt> file, by replacing <tt/sufficient/ in the
158 above example with <tt/required/.
159
160 </descrip>
161
162 <!--
163 End of sgml insert for this module.
164 -->