Add libtool-ltdl-devel as a prerequisite for building.
[freeradius.git] / man / man1 / radclient.1
1 .TH RADCLIENT 1 "7 April 2005" "" "FreeRADIUS Daemon"
2 .SH NAME
3 radclient - send packets to a RADIUS server, show reply
4 .SH SYNOPSIS
5 .B radclient
6 .RB [ \-d
7 .IR raddb_directory ]
8 .RB [ \-c
9 .IR count ]
10 .RB [ \-f
11 .IR file ]
12 .RB [ \-i
13 .IR id ]
14 .RB [ \-n
15 .IR num_requests_per_second ]
16 .RB [ \-p
17 .IR num_requests_in_parallel ]
18 .RB [ \-r
19 .IR num_retries ]
20 .RB [ \-s ]
21 .RB [ \-S
22 .IR shared_secret_file ]
23 .RB [ \-t
24 .IR timeout ]
25 .RB [ \-qvx ]
26 \fIserver {acct|auth|status|disconnect} secret\fP
27 .SH DESCRIPTION
28 \fBradclient\fP is a radius client program. It can send arbitrary radius
29 packets to a radius server, then shows the reply. It can be used to
30 test changes you made in the configuration of the radius server,
31 or it can be used to monitor if a radius server is up.
32 .PP
33 \fBradclient\fP reads radius attribute/value pairs from it standard
34 input, or from a file specified on the command line. It then encodes
35 these attribute/value pairs using the dictionary, and sends them
36 to the remote server.
37 .PP
38 The \fIUser-Password\fP and \fICHAP-Password\fP attributes are
39 automatically encrypted before the packet is sent to the server.
40
41 .SH OPTIONS
42
43 .IP \-c\ \fIcount\fP
44 Send each packet \fIcount\fP times.
45 .IP \-d\ \fIraddb_directory\fP
46 The directory that contains the RADIUS dictionary files. Defaults to
47 \fI/etc/raddb\fP.
48 .IP \-f\ \fIfile\fP
49 File to read the attribute/value pairs from. If this is not specified,
50 they are read from stdin.  This option can be specified multiple
51 times, in which case packets are sent in order by file, and within
52 each file, by first packet to last packet.  A blank line separates
53 logical packets within a file.
54 .IP \-i\ \fIid\fP
55 Use \fIid\fP as the RADIUS request Id.
56 .IP \-n\ \fInum_requests_per_second\fP
57 Send \fInum_requests_per_second\fP, evenly spaced over time.  By
58 default, the requests are sent as fast as possible.  This option
59 allows you to slow down the rate at which radclient sends requests.
60 .IP \-p\ \fInum_requests_in_parallel\fP
61 Send \fInum_requests_in_parallel\fP, without waiting for a response
62 for each one.  By default, radclient sends the first request it has
63 read, waits for the response, and once the response is received, sends
64 the second request in its list.  This option allows you to send many
65 requests at simultaneously.  Once \fInum_requests_in_parallel\fP are
66 sent, radclient waits for all of the responses to arrive (or for the
67 requests to time out), before sending any more packets.
68 .IP \-q
69 Go to quiet mode, and do not print out anything.
70 .IP \-r\ \fInum_retries\fP
71 Try to send each packet \fInum_retries\fP times, before giving up on
72 it.  The default is 10.
73 .IP \-s
74 Print out some summaries of packets sent and received.
75 .IP \-S\ \fIshared_secret_file\fP
76 Rather than reading the shared secret from the command-line (where it
77 can be seen by others on the local system), read it instead from
78 \fIshared_secret_file\fP.
79 .IP \-t\ \fItimeout\fP
80 Wait \fItimeout\fP seconds before deciding that the NAS has not
81 responded to a request, and re-sending the packet.  The default
82 timeout is 3.
83 .IP \-v
84 Print out version information.
85 .IP \-x
86 Print out debugging information.
87 .IP server[:port]
88 The hostname or IP address of the remote server. Optionally a UDP port
89 can be specified. If no UDP port is specified, it is looked up in
90 \fI/etc/services\fP. The service name looked for is \fBradacct\fP for
91 accounting packets, and \fBradius\fP for all other requests. If a
92 service is not found in \fI/etc/services\fP, 1813 and 1812 are used
93 respectively.
94
95 .IP acct\ |\ auth\ |\ status\ |\ disconnect
96 Use \fBauth\fP to send an authentication packet (Access-Request),
97 \fBacct\fP to send an accounting packet (Accounting-Request),
98 \fBstatus\fP to send an status packet (Status-Server), or
99 \fBdisconnect\fP to send a disconnection request. Instead of these
100 values, you can also use a decimal code here. For example, code 12 is
101 also \fBStatus-Server\fP.
102
103 .IP secret
104 The shared secret for this client.  It needs to be defined on the
105 radius server side too, for the IP address you are sending the radius
106 packets from.
107
108 .SH EXAMPLE
109
110 A sample session that queries the remote server for
111 \fIStatus-Server\fP (not all servers support this, but FreeRADIUS has
112 configurable support for it).
113 .RS
114 .sp
115 .nf
116 .ne 3
117 $ echo "User-Name = fnord" | radclient 192.168.1.42 12 s3cr3t
118 Sending request to server 192.168.1.42, port 1812.
119 radrecv: Packet from host 192.168.1.42 code=2, id=140, length=54
120     Reply-Message = "FreeRADIUS up 21 days, 02:05"
121 .fi
122 .sp
123 .RE
124
125 .SH SEE ALSO
126 radiusd(8),
127 .SH AUTHORS
128 Miquel van Smoorenburg, miquels@cistron.nl.
129 Alan DeKok <aland@freeradius.org>