The NAS generates the MN-FA key, not the AAA
[freeradius.git] / man / man5 / rlm_passwd.5
1 .\"     # DS - begin display
2 .de DS
3 .RS
4 .nf
5 .sp
6 ..
7 .\"     # DE - end display
8 .de DE
9 .fi
10 .RE
11 .sp
12 ..
13 .TH rlm_passwd 5 "14 April 2004" "" "FreeRADIUS Module"
14 .SH NAME
15 rlm_passwd \- FreeRADIUS Module
16 .SH DESCRIPTION
17 The \fIrlm_passwd\fP module provides authorization via files similar
18 in format to /etc/passwd.
19 .PP
20 The \frlm_passwd\fP module allows you to retrieve any account
21 information from any files with passwd-like format (/etc/passwd,
22 /etc/group, smbpasswd, .htpasswd, etc).  Every field of the file may
23 be mapped to a RADIUS attribute, with one of the fields used as a
24 key.
25 .PP
26 The module reads the file when it initializes, and caches the data
27 in memory.  As a result, it does not support dynamic updates of the
28 files (the server has to be HUP'd), but it is very fast, even for
29 files with thousands of lines.
30 .PP
31 The configuration item(s):
32 .IP filename
33 The path to the file.
34 .IP delimiter\ =\ ":"
35 The character to use as a delimiter between fields.  The default is
36 ":"
37 .IP hashsize
38 The size of the hashtable.  If 0, then the passwords are not cached
39 and the passwd file is parsed for every request.  We do not recommend
40 such a configuration.  A larger hashsize means less probability of
41 collision and faster search in hashtable. Having a hashsize in the range
42 of 30-100% of the number of passwd file records is reasonable.
43 .IP allowmultiplekeys
44 If set to 'yes', and more than one record in file matches the request,
45 then the attributes from all records will be used. If set to 'no' (the
46 default) the module will warn about duplicated records.
47 .IP ignorenislike
48 If set to 'yes', then all records from the file beginning with the '+'
49 sign will be ignored.  The default is 'no'.
50 .IP format
51 The format of the fields in the file, given as an example line from
52 the file, with the content of the fields as the RADIUS attributes
53 which the fields map to.  The fields are seperated by the ':' character.
54 .PP
55 The key field is signified by being preceded with a '*' character,
56 which indicates that the field has only one key, like the /etc/passwd
57 file.  The key field may instead be preceded with '*,', which
58 indicates that the field has multiple possible keys, like the
59 /etc/group file.
60 .PP
61 The other fields signify RADIUS attributes which, by default, are
62 added to the configuration items for a request. 
63 .PP
64 To add an attribute to the request (as though it was sent by the NAS),
65 prefix the attribute name in the "format" string with the '~' character.
66 .PP
67 To add an attribute to the reply (to be sent back to the NAS) prefix
68 the attribute name in the "format" string with the '=' character.
69 .IP ignoreempty
70 This configuration item defaults to "yes".  If there is no value for
71 the attribute, then the attribute is not added.  By setting this value
72 to "no", you can force the attribute to be added, even if there is no
73 value.
74
75 .SH EXAMPLES
76 .DS
77 format = "My-Group:::*,User-Name"
78 .DE
79 .IP
80 Parse a file similar to the /etc/group file.  An entry matches a
81 request when the name in a User-Name attribute exists in the
82 comma-seperated list of a line in the file.  When an entry matches, 
83 a "My-Group" attribute will be created and added to the configuration
84 items for the request.  The value of that attribute will be taken from
85 the first field of the matching line in the file.
86 .IP
87 The ":::" in the format string means that there are extra two fields
88 in the line, in between the group name and list of user names.  Those
89 fields do not map to any RADIUS attribute, and are therefore ignored.
90 .IP
91 For this example to work in practice, you will have to add the
92 My-Group attribute to the dictionary file.  See the dictionary manual
93 page for details on how this may be done.
94 .PP
95 .DS
96 format = "~My-Group:::*,User-Name"
97 .DE
98 .IP
99 Similar to the previous entry, except the My-Group attribute is added
100 to the request, as though it was sent by the NAS.
101 .SH SECTIONS
102 .BR authorize
103 .PP
104 .SH FILES
105 .I /etc/raddb/radiusd.conf
106 .PP
107 .SH "SEE ALSO"
108 .BR radiusd (8),
109 .BR radiusd.conf (5)
110 .BR dictionary (5),
111 .SH AUTHOR
112 Alan DeKok <aland@freeradius.org>
113