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