import from branch_1_1:
[freeradius.git] / man / man1 / radwho.1
1 .TH RADWHO 1 "7 April 2005" "" "FreeRADIUS Daemon"
2 .SH NAME
3 radwho - show online users
4 .SH SYNOPSIS
5 .B radwho
6 .RB [ \-c ]
7 .RB [ \-d
8 .IR raddb_directory ]
9 .RB [ \-f ]
10 .RB [ \-i ]
11 .RB [ \-n ]
12 .RB [ \-N
13 .IR nas_ip_address ]
14 .RB [ \-p ]
15 .RB [ \-P
16 .IR nas_port ]
17 .RB [ \-r ]
18 .RB [ \-R ]
19 .RB [ \-s ]
20 .RB [ \-S ]
21 .RB [ \-u
22 .IR user ]
23 .RB [ \-U
24 .IR user ]
25 .RB [ \-Z ]
26 .SH DESCRIPTION
27 The FreeRADIUS server can be configured to maintain an active session
28 database in a file called \fIradutmp\fP. This utility shows the
29 content of that session database.
30 .SH OPTIONS
31 .IP \-c
32 Shows caller ID (if available) instead of the full name.
33 .IP \-d\ \fIraddb_directory\fP
34 The directory that contains the RADIUS configuration files. Defaults to
35 \fI/etc/raddb\fP.
36 .IP \-f
37 Behave as the 'fingerd' daemon - waits for one line of input, then
38 prints the output with lines \\r\\n terminated.
39 .IP \-i
40 Shows the session ID instead of the full name.
41 .IP \-n
42 Normally radwho looks up the username in the systems password file,
43 and shows the full username as well. The \fB-n\fP flags prevents this.
44 .IP \-N\ \fInas_ip_address\fP
45 Show only those entries which match the given NAS IP address.
46 .IP \-p
47 Adds an extra column for the port type - I for ISDN, A for Analog.
48 .IP \-P\ \fInas_port\fP
49 Show only those entries which match the given NAS port.
50 .IP \-r
51 Outputs all data in \fIraw\fP format - no headers, no formatting,
52 fields are comma-separated.
53 .IP \-R
54 Output all data in RADIUS attribute format.  All fields are printed.
55 .IP \-s
56 Show full name.
57 .IP \-S
58 Hide shell users. Doesn't show the entries for users that do not
59 have a SLIP or PPP session.
60 .IP \-u\ \fIuser\fP
61 Show only those entries which match the given username (case insensitive).
62 .IP \-U\ \fIuser\fP
63 Show only those entries which match the given username (case sensitive).
64 .IP \-Z
65 When combined with \fI-R\fP, prints out the contents of an
66 Accounting-Request packet which can be passed to \fIradclient\fP, in
67 order to "zap" that users session from \fIradutmp\fP.
68 .PP
69 For example,
70 .RS
71 .sp
72 .nf
73 .ne 3
74 $ radwho -ZRN 10.0.0.1 | radclient -f - radius.example.net acct testing123
75 .fi
76 .sp
77 .RE
78 will result in all an Accounting-Request packet being sent to the
79 RADIUS server, which tells the server that the NAS rebooted.  i.e. It
80 "zaps" all of the users on that NAS.
81
82 To "zap" one user, specifiy NAS, username, and NAS port:
83 .RS
84 .sp
85 .nf
86 .ne 3
87 $ radwho -ZRN 10.0.0.1 -u user -P 10 | radclient -f - radius.example.net acct testing123
88 .fi
89 .sp
90 .RE
91 Other combinations are also possible.
92
93 .SH SEE ALSO
94 radiusd(8),
95 radclient(1),
96 radiusd.conf(5).
97 .SH AUTHOR
98 Miquel van Smoorenburg, miquels@cistron.nl.