type.data is malloc'd by everyone BUT radeapclient, which
[freeradius.git] / man / man8 / radiusd.8
1 .TH RADIUSD 8 "23 June 2004" "" "FreeRADIUS Daemon"
2 .SH NAME
3 radiusd - Authentication, Authorization and Accounting server
4 .SH SYNOPSIS
5 .B radiusd
6 .RB [ \-A ]
7 .RB [ \-S ]
8 .RB [ \-a
9 .IR accounting_directory ]
10 .RB [ \-b ]
11 .RB [ \-c ]
12 .RB [ \-d
13 .IR config_directory ]
14 .RB [ \-f ]
15 .RB [ \-i
16 .IR ip-address ]
17 .RB [ \-l
18 .IR log_directory ]
19 .RB [ \-g
20 .IR facility ]
21 .RB [ \-p
22 .IR port ]
23 .RB [ \-s ]
24 .RB [ \-v ]
25 .RB [ \-x ]
26 .RB [ \-X ]
27 .RB [ \-y ]
28 .RB [ \-z ]
29 .SH DESCRIPTION
30 This is the FreeRADIUS implementation of the well known
31 .B radius
32 server program.  Even though this program is largely compatible with
33 \fILivingston's\fP radius version 2.0, it is \fBnot\fP based on any
34 part of that code.
35 .PP
36 FreeRADIUS is a high-performance and highly configurable RADIUS
37 server.  As a result, it can be difficult to configure in systems with
38 complex requirements.  Our suggestion is to proceed via the following
39 steps:
40 .PP
41 1) Always run the server in debugging mode (
42 .B radiusd -X
43 ).  We cannot emphasize this enough.  If you are not running the
44 server in debugging mode, you \fIwill not\fP be able to see what is
45 doing, and you \fIwill not\fP be able to correct any problems.
46 .PP
47 2) When editing the \fIradiusd.conf\fP file, change as little as
48 possible, especially in the \fIauthorize{}\fP section.  The ordering
49 of the modules is critical for the server to be able to
50 "automatically" figure out how to handle the request.  Changing the
51 order of the modules ensures that the server will not work.
52 .PP
53 3) When testing, start off by configuring a user and password in the
54 \fIusers\fP file.  So long as the server knows about a user, and has a
55 clear-text password for that user, \fBalmost all of the authentication
56 methods will "just work"\fP.
57 .PP
58 4) Gradually add more complex configurations to the server, while
59 testing them as you go.  If you start off by configuring the server in
60 a complex configuration, you will never be able to debug it.
61 .PP
62 5) Ask questions on the mailing list
63 (freeradius-users@lists.freeradius.org).  When asking questions,
64 include the output from debugging mode (
65 .B radiusd -X
66 ).  This information will allow people to help you.  Without it, your
67 message will get ignored.
68
69 .SH BACKGROUND
70 \fBRADIUS\fP is a protocol spoken between an access server, typically
71 a device connected to several modems or ISDN lines, and a \fBradius\fP
72 server. When a user connects to the access server, (s)he is asked for
73 a loginname and a password. This information is then sent to the \fBradius\fP
74 server. The server replies with "access denied", or "access OK". In the
75 latter case login information is sent along, such as the IP address in
76 the case of a PPP connection.
77 .PP
78 The access server also sends login and logout records to the \fBradius\fP
79 server so accounting can be done. These records are kept for each terminal
80 server seperately in a file called \fBdetail\fP, and in the \fIwtmp\fP
81 compatible logfile \fB/var/log/radwtmp\fP.
82
83 .SH OPTIONS
84
85 .IP \-A
86 Write a file \fIdetail.auth\fP in addition to the standard \fBdetail\fP file
87 in the same directory. This file will contain all the authentication-request
88 records. This can be useful for debugging, but not for normal operation.
89
90 This command line option is accepted only for backwards
91 compatibility.  It no longer does anything.  See the configuration for
92 the \fIdetail\fP module in \fIradiusd.conf\fP.
93
94 .IP \-S
95 Write the stripped usernames (without prefix or suffix) in the \fBdetail\fP
96 file instead of the raw record as received from the terminal server.
97
98 This command line option is deprecated.  See the \fIlog_stripped_names\fP
99 configuration item in the \fIradiusd.conf\fP file.
100
101 .IP "\-a \fIaccounting directory\fP"
102 This defaults to \fI/var/log/radacct\fP. If that directory exists,
103 \fBradiusd\fP will write an ascii accounting record into a detail file for
104 every login/logout recorded. The location of the detail file is
105 \fIacct_dir/\fP\fBterminal_server\fP\fI/detail\fP.
106
107 This command line option is deprecated.  See the \fIradacctdir\fP
108 configuration item in the \fIradiusd.conf\fP file.
109
110 .IP "\-l \fIlogging directory\fP"
111 This defaults to \fI/var/log\fP. \fBRadiusd\fP writes a logfile here
112 called \fIradius.log\fP. It contains informational and error messages,
113 and optionally a record of every login attempt (for aiding an ISP's
114 helpdesk). The special arguments \fIstdout\fP and \fIstderr\fP cause
115 the information to get written to the standard output, or standard
116 error instead. The special argument \fIsyslog\fP sends the information
117 with \fBsyslog\fP(3).
118
119 This command line option is deprecated.  See the \fIlog_dir\fP
120 configuration item in the \fIradiusd.conf\fP file.
121
122 .IP "\-g \fIfacility\fP"
123 Specifies the syslog facility to be used with \fB-l syslog\fP. Default is
124 \fIdaemon\fP. Another reasonable choice would be \fIauthpriv\fP.
125
126 .IP "\-d \fIconfig directory\fP"
127 Defaults to \fI/etc/raddb\fP. \fBRadiusd\fP looks here for its configuration
128 files such as the \fIdictionary\fP and the \fIusers\fP files.
129
130 .IP "\-i \fIip-address\fP"
131 Defines which IP addres to bind to for sending and receiving packets-
132 useful for multi-homed hosts.
133
134 This command line option is deprecated.  See the \fIbind_address\fP
135 configuration item in the \fIradiusd.conf\fP file.
136
137 .IP \-b
138 If the \fBradius\fP server binary was compiled with \fIdbm\fP support,
139 this flag tells it to actually \fIuse\fP the database files instead of the
140 flat \fIusers\fP file.
141
142 This command line option is deprecated, and does not do anything.
143
144 .IP \-c
145 This is still an \fIexperimental\fP feature.
146 Cache the password, group and shadow files in a hash-table in memory.
147 This makes the radius process use a bit more memory, but username
148 lookups in the password file are \fImuch\fP faster.
149 .IP
150 After every change in the real password file (user added, password changed)
151 you need to send a \fBSIGHUP\fP to the radius server to let it re-read
152 its configuration and the password/group/shadow files !
153
154 This command line option is deprecated.  See the \fIcache\fP
155 configuration item for the \fIunix\fP module in the \fIradiusd.conf\fP
156 file.
157
158 .IP \-f
159 Do not fork, stay running as a foreground process.
160
161 .IP "\-p \fIport\fP"
162 Normally radiusd listens on the ports specified in \fI/etc/services\fP
163 (radius and radacct). With this option radiusd listens on the specified
164 port for authentication requests and on the specified port +1 for
165 accounting requests.
166
167 This command line option is deprecated.  See the \fIport\fP
168 configuration item in the \fIradiusd.conf\fP file.
169
170 .IP \-s
171 Run in "single server" mode.  The server normally runs with multiple
172 threads and/or processes, which can lower its response time to
173 requests.  Some systems have issues with threading, however, so
174 running in "single server" mode may help to address those issues.  In
175 single server mode, the server will also not "daemonize"
176 (auto-background) itself.
177
178 .IP \-v
179 Print server version information and exit.
180
181 .IP \-x
182 Debug mode. In this mode the server will print details of every request
183 on it's \fBstderr\fP output. Most useful in combination with \fB-s\fP.
184 You can specify this option 2 times (-x -x or -xx) to get a bit more
185 debugging output.
186
187 .IP \-X
188 Extended debug mode.  Equivalent to -sfxx, but simpler to explain.
189
190 .IP \-y
191 Write details about every authentication request in the
192 \fIradius.log\fP file.
193
194 This command line option is deprecated.  See the \fIlog_auth\fP
195 configuration item in the \fIradiusd.conf\fP file.
196
197 .IP \-z
198 Include the password in the \fIradius.log\fP file \fBeven\fP for successful
199 logins. \fIThis is very insecure!\fP.
200
201 This command line option is deprecated.  See the
202 \fIlog_auth_badpass\fP and the \fIlog_auth_goodpass\fP configuration
203 items in the \fIradiusd.conf\fP file.
204
205 .SH CONFIGURATION
206 \fBRadiusd\fP uses a number of configuration files. Each file has it's
207 own manpage describing the format of the file. These files are:
208 .IP radiusd.conf
209 The main configuration file, which sets the administrator-controlled
210 items.
211 .IP dictionary
212 This file is usually static. It defines all the possible RADIUS attributes
213 used in the other configuration files.  You don't have to modify it.
214 It includes other dictionary files in the same directory.
215 .IP clients
216 [ Deprecated ] Contains the IP address and a secret key for every
217 client that wants to connect to the server.
218 .IP naslist
219 Contains an entry for every NAS (Network Access Server) in the network. This
220 is not the same as a client, especially if you have \fBradius\fP proxy server
221 in your network. In that case, the proxy server is the client and it sends
222 requests for different NASes.
223 .IP
224 It also contains a abbreviated name for each
225 terminal server, used to create the directory name where the \fBdetail\fP
226 file is written, and used for the \fB/var/log/radwtmp\fP file. Finally
227 it also defines what type of NAS (Cisco, Livingston, Portslave) the NAS is.
228 .IP hints
229 Defines certain hints to the radius server based on the users's loginname
230 or other attributes sent by the access server. It also provides for
231 mapping user names (such as Pusername -> username). This provides the
232 functionality that the \fILivingston 2.0\fP server has as "Prefix" and
233 "Suffix" support in the \fIusers\fP file, but is more general. Ofcourse
234 the Livingston way of doing things is also supported, and you can even use
235 both at the same time (within certain limits).
236 .IP huntgroups
237 Defines the huntgroups that you have, and makes it possible to restrict
238 access to certain huntgroups to certain (groups of) users.
239 .IP users
240 Here the users are defined. On a typical setup, this file mainly contains
241 DEFAULT entries to process the different types of logins, based on hints
242 from the hints file. Authentication is then based on the contents of
243 the UNIX \fI/etc/passwd\fP file. However it is also possible to define all
244 users, and their passwords, in this file.
245 .SH SEE ALSO
246 radiusd.conf(5), users(5), huntgroups(5), hints(5),
247 clients(5), dictionary(5).
248 .SH AUTHOR
249 The FreeRADIUS Server Project (http://www.freeradius.org)
250