Added sample commands
[freeradius.git] / man / man8 / radmin.8
1 .TH RADMIN 8 "15 Feb 2009" "" "FreeRADIUS Server Administration Tool"
2 .SH NAME
3 radmin - FreeRADIUS Administration tool
4 .SH SYNOPSIS
5 .B radmin
6 .RB [ \-d
7 .IR config_directory ]
8 .RB [ \-e
9 .IR command ]
10 .RB [ \-f
11 .IR socket_file ]
12 .RB [ \-i
13 .IR input_file ]
14 .RB [ \-n
15 .IR name ]
16 .RB [ \-o
17 .IR output_file ]
18 .RB [ \-q ]
19 .SH DESCRIPTION
20 FreeRADIUS Server administration tool that connects to the control
21 socket of a running server, and gives a command-line interface to it.
22
23 At this time, only a few commands are supported.  Please type "help"
24 at the command prompt for detailed information about the supported
25 commands.
26 .SH WARNING
27 This tool is experimental and should not be used in production
28 environments.  Changes may be made at any time to the commands
29 accepted by the server, and/or to the resulting output.
30
31 The security protections offered by this command are pretty minimal.
32 If someone has permission to connect to the server, they can do almost
33 anything, from stopping the server, to changing its configuration.
34
35 Please exercise caution when using this command!
36 .SH OPTIONS
37 The following command-line options are accepted by the program.
38 .IP "\-d \fIconfig directory\fP"
39 Defaults to \fI/etc/raddb\fP. \fBradmin\fP looks here for the server
40 configuration files to find the "listen" section that defines the
41 control socket filename.
42 .IP "\-e \fIcommand\fP"
43 Run \fIcommand\fP and exit.
44 .IP "\-f \fIsocket_file\fP"
45 Specify the socket filename directly.  The radiusd.conf file is not read.
46 .IP "\-i \fIinput_file\fP"
47 Reads input from the specified file.  If not specified, stdin is used.
48 This also sets "-q".
49 .IP "\-n \fImname\fP"
50 Read \fIraddb/name.conf\fP instead of \fIraddb/radiusd.conf\fP.
51 .IP "\-o \fIoutput_file\fP"
52 Write output to the specified file.  If not specified, stdout is used.
53 This also sets "-q".
54 .IP \-q
55 Quiet mode.
56 .SH COMMANDS
57 The commands implemented by the command-line interface are almost
58 completely controlled by the server.  There are a few commands
59 interpreted locally by radmin:
60 .IP reconnect
61 Reconnect to the server.
62 .IP quit
63 Exit from radmin.
64 .IP exit
65 Exit from radmin.
66 .PP
67 The other commands are implemented by the server.  Type "help" at the
68 prompt for more information.
69 .SH EXAMPLES
70 .IP debug\ file\ /var/log/radius/bob.log
71 Set debug logs to /var/log/radius/bob.log.  There is very little
72 checking of this filename.  Rogue administrators may be able use this
73 command to over-write almost any file on the system.  If those
74 administrators have write access to "radius.conf", they can do the
75 same thing without radmin, too.
76 .IP debug\ condition\ '(User-Name\ ==\ "bob")'
77 Enable debugging output for all requests that match the condition.
78 Any "unlang" condition is valid here.  The condition is parsed as a
79 string, so it must be enclosed in single or double quotes.  Strings
80 enclosed in double-quotes must have back-slashes and the quotation
81 marks escaped inside of the string.
82
83 Only one debug condition can be active at a time.
84 .IP debug\ condition\ '((User-Name\ ==\ "bob")\ ||\ (Packet-Src-IP-Address\ ==\ 192.0.2.22))'
85 A more complex condition that enables debugging output for requests
86 containing User-Name "bob", or requests that originate from source IP
87 address 192.0.2.22.
88 .IP debug\ condition
89 Disable debug conditionals.
90 .SH FULL LIST OF COMMANDS
91 .IP add\ <command>
92 do sub-command of add
93 .IP add\ client\ <command>
94 Add client configuration commands
95 .IP add\ client\ file\ <filename>
96 Add new client definition from <filename>
97 .IP debug\ <command>
98 debugging commands
99 .IP debug\ condition\ [condition]
100 Enable debugging for requests matching [condition]
101 .IP debug\ level\ <number>
102 Set debug level to <number>.  Higher is more debugging.
103 .IP debug\ file\ [filename]
104 Send all debugging output to [filename]
105 .IP hup\ [module]
106 sends a HUP signal to the server, or optionally to one module
107 .IP reconnect
108 reconnect to a running server
109 .IP terminate
110 terminates the server, and cause it to exit
111 .IP set\ <command>
112 do sub-command of set
113 .IP set\ module\ <command>
114 set module commands
115 .IP set\ module\ config\ <module>\ variable\ value
116 set configuration for <module>
117 .IP set\ home_server\ <command>
118 set home server commands
119 .IP set\ home_server\ state\ <ipaddr>\ <port>\ [alive|dead]
120 set state for given home server
121 .IP show\ <command>
122 do sub-command of show
123 .IP show\ client\ <command>
124 do sub-command of client
125 .IP show\ client\ config\ <ipaddr>
126 show configuration for given client
127 .IP show\ client\ list
128 shows list of global clients
129 .IP show\ debug\ <command>
130 show debug properties
131 .IP show\ debug\ condition
132 Shows current debugging condition.
133 .IP show\ debug\ level
134 Shows current debugging level.
135 .IP show\ debug\ file
136 Shows current debugging file.
137 .IP show\ home_server\ <command>
138 do sub-command of home_server
139 .IP show\ home_server\ config\ <ipaddr>\ <port>
140 show configuration for given home server
141 .IP show\ home_server\ list
142 shows list of home servers
143 .IP show\ home_server\ state\ <ipaddr>\ <port>
144 shows state of given home server
145 .IP show\ module\ <command>
146 do sub-command of module
147 .IP show\ module\ config\ <module>
148 show configuration for given module
149 .IP show\ module\ flags\ <module>
150 show other module properties
151 .IP show\ module\ list
152 shows list of loaded modules
153 .IP show\ module\ methods\ <module>
154 show sections where <module> may be used
155 .IP show\ uptime
156 shows time at which server started
157 .IP show\ version
158 Prints version of the running server
159 .IP show\ xml\ <reference>
160 Prints out configuration as XML
161 .IP stats\ <command>
162 do sub-command of stats
163 .IP stats\ client\ [auth/acct]\ <ipaddr>
164 show statistics for client
165 .IP stats\ home_server\ <ipaddr>\ <port>
166 show statistics for home server
167 .SH SEE ALSO
168 unlang(5), radiusd.conf(5), raddb/sites-available/control-socket
169 .SH AUTHOR
170 Alan DeKok <aland@freeradius.org>