[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Controlling who and when was logged in
12.1 radwho
Show who is logged in by radius now. 12.2 radlast
Show the history of logins by radius.
Maintenance commands
12.3 radzap
Modify the login records. 12.4 radgrep
Quickly find the login record. 12.5 radping
Ping the remote machine by the username. 12.6 radauth
Check if a user can be authenticated. 12.7 radctl
Radctl monitor. 12.8 builddbm
Create DBM version of the `raddb/users' file.
Guile interface
12.9 radscm
: A Guile Interface to Radius FunctionsA Guile interface to radius functions.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radwho
Radwho
displays the list of users currently logged in by the
Radius server.
Default output information is made compatible with that of the standard
UNIX finger(1)
utility. For each user the following information is
displayed: login name, name, connection protocol, NAS port, login date,
NAS name, assigned IP or corresponding network name.
When used with `-l' option, the long output format is used. In this format the following information is output:
12.1.1 radwho
Command Line OptionsCommand line options. 12.1.2 radwho
Format Strings12.1.3 radwho
Predefined Formats
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radwho
Command Line Options The following command line options can be used to modify the behavior of the program:
strftime(3)
format string. It defaults to %a %H:%M
, i.e. the abbreviated weekday
name according to the current locale, and the hour and the minutes as two-digit
decimal numbers.
radwho
is fed to some analyzing program, as it helps to keep
the same number of columns on each line of output.
fingerd
mode. In this mode radwho
emulates the
behavior of the fingerd(8)
utility. Use this option if starting
radwho
from the `/etc/inetd.conf' line like this (5):
finger stream tcp nowait nobody /usr/sbin/radwho radwho -fL |
This mode is also enabled by default if radwho
notices that its
name (argv[0]
) is `fingerd' or `in.fingerd'.
radwho
as a finger daemon.
RADWHO_FORMAT
. The format
is either a symbolic name of one of the predefined formats or a format
specification (see next subsection).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radwho
Format Strings A format string controls the output of every record from `radutmp'. It contains two types of objects: ordinary characters, which are simply copied to the output, and format specifications, each of which causes output of a particular piece of information from the `radutmp' record.
Each format specification starts with an opening brace and ends with a closing brace. The first word after the brace is the name of the format specification. The rest of words are positional arguments followed by keyword arguments. Both are optional. The keyword arguments begin with a colon and must follow the positional arguments.
The full list of format specifications follows.
The following specifications output particular fields of a `radutmp' record. They all take two positional arguments: width and title.
The first argument, width sets the maximum output
length for this specification. If the number of characters actually output
is less than the width, they will be padded with whitespace either to
the left or to the right, depending on the presence of the :right
keyword argument. If the number of characters is greater than width, they
will be truncated to fit. If width is
not given, the exact data are output as is.
The second argument, title, gives the title of this column for the heading line. By default no title is output.
Every field specification accepts at least two keyword arguments.
The keyword :right
may be used to request alignment to the right
for the data. This keyword is ignored if width is not given.
The keyword :empty
followed by a string causes radwho
to output that string if the resulting value for this specification
would otherwise be empty.
The :nodomain
keyword suppresses the output of the domain part of
the name, i.e., the hostname is displayed only up to the first dot.
The :nodomain
keyword suppresses the output of the domain part of
the name, i.e. the hostname is displayed only up to the first dot.
Framed-Protocol
attribute.
If the symbolic value is found in the dictionary file, it will be
displayed. Otherwise, the numeric value will be displayed as is.
The :format
keyword introduces the strftime
format string
to be used when converting the date for printing. The default value is
%a %H:%M
.
Acct-Delay-Time
).
NAS-Port-Type
attribute.
If the symbolic value is found in the dictionary file, it will be
displayed. Otherwise, the numeric value will be displayed as is.
:nodomain
keyword may be used to suppress the output of the
domain part of the name, i.e. to display the hostname only up to the
first dot.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radwho
Predefined Formats The predefined formats are:
(login 10 Login) (gecos 17 Name) \ (protocol 5 Proto) (nas-port 5 TTY) \ (time 9 When) (nas-address 9 From) \ (framed-address 16 Location) |
(login 32 Login) (session-id 32 SID) \ (protocol 5 Proto) (nas-port 5 Port) \ (time 27 Date) (nas-address 32 NAS) \ (clid 17 CLID) (duration 7 Duration) \ (framed-address 16 Location) (realm 16 Realm) |
User: (login)(newline)\ In real life: (gecos)(newline)\ Logged in: (time)(newline)\ NAS: (nas-address)(newline)\ Port: (nas-port)(newline)\ CLID: (clid)(newline)\ Protocol: (protocol)(newline)\ Session ID: (session-id)(newline)\ Uptime: (duration)(newline)\ Assigned IP: (framed-address)(newline)\ Realm: (realm)(newline)" |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radlast
The radlast
utility lists sessions of specified users, NASes,
NAS ports, and hosts, in reverse time order. By default, each line of output
contains the login name, the NAS short name and port number from where the
session was conducted, the host IP or name, the start and stop
times for the session, and the duration of the session. If the session
is still continuing, radlast
will so indicate.
When the `-l' option is specified, radlast
produces long
output. It includes following fields:
12.2.1 radlast
Command Line OptionsCommand line options.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radlast
Command Line Options
Use following command line options to control the behavior of the
radlast
utility:
radlast
will output at most this many
lines of information.
radlast -p S03
or radlast -p 3
.
last(1)
.
If multiple arguments are given, the logical OR operation between them is assumed, i.e., the information selected by each argument is printed. This, however, does not apply to the `-c' option. That option is always combined with the rest of command line by logical AND.
The pseudo-user `~reboot' logs in on every reboot of the network access server.
If radlast
is interrupted, it indicates to what date the search
had progressed.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radzap
radzap
searches the Radius accounting database for matching login
records and closes them.
At least one of the options `-n', `-p', or the user name must be specified. If they are used in conjunction, they are taken as if joined by the logical AND operation.
radzap
operates in two modes: silent and confirm. The silent
mode is enabled by default. When run in this mode, radzap
deletes
every record that matches the search conditions given.
In confirm mode radzap
will ask for a confirmation
before zapping each matching record. Any line beginning with a `y'
is taken as a positive response; any other line is taken as a negative
response.
The confirm mode is toggled by the command line option `-c'.
radzap [options] [username] |
Options are:
This option is deprecated. It is currently retained for backward compatibility with previous versions.
radzap -p S02
, or in
its short form, e.g. radzap -p 2
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radgrep
This utility allows one to quickly look up the user in the Radius
accounting database, using a regular expression match.
radgrep
scans the output of radwho
utility and
outputs only the lines that match given regular expressions.
radgrep
accepts two sets of options separated by `--'
(double hyphen). The first subset is passed as the command line to the
radwho
utility. The second one is passed to grep
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radping
This utility is a shell program that determines the user's
framed IP and runs ping
on that address.
radping username radping -c calling-station-id |
The second way of invoking the program allows one to use the calling station ID to indicate the user.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radauth
The radauth
utility sends the Radius server an Access-Request
packet and displays the result it gets. If the server responds with
Access-Accept
radauth
can also send an
Accounting-Request
thereby initiating user's session.
The utility is a radtest
program. See section 13.2.12 Sample Radtest Program, for the detailed discussion of its internals.
radauth [options] [command] user-name [password] |
Options are:
<FIXME> GNU long options are not yet supported </>
Valid commands are:
Access-Request
. This is the default.
Access-Request
. If successfull, send
Accounting-Request
with Acct-Status-Type = Start
.
Accounting-Request
with Acct-Status-Type = Start
.
Accounting-Request
with Acct-Status-Type = Stop
.
The program determines which Radius server to use, the authentication port number, and the shared secret, following the procedure common to all client scripts (see section 13.1 Client Configuration).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radctl
Radctl
is a control interface to the radiusd
daemon. It allows the
user running it to query radiusd
about various aspects of its
work and to issue administrative commands to it. The syntax is
radctl command [args] |
where command is a command telling radctl
which actions to
take, and args are optional arguments to the command. Only one
command can be specified per invocation.
The valid commands are as follows:
start [args]
radiusd
is not running already, it is started. When
present, args are passed as the command line to the
server.
stop
radiusd
.
restart [args]
reload
radiusd
server to reread its configuration files.
dumpdb
radiusd
to dump its user hash table into the file
`radlog/radius.parse'. This can be used for debugging
configuration files.
which
radiusd
. This command shows
the line of ps(1)
describing the running copy of
radiusd
program. The exact look depends on the version of
operating system you are running. Please refer to "man ps" for more
detail on ps
output.
Here is an example of what radctl which
prints on
GNU/Linux
:
19692 ? 01:53:11 radiusd |
Here, first field is the PID of the process, second field (`?') indicates that the running program has detached from the controlling terminal, the third field gives total amount of CPU time used by the program, and, finally, the last field shows the full name under which the command was invoked.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
builddbm
builddbm
converts the plaintext Radius users database into
DBM files. Some versions of the Radius daemon have used this to
speed up the access to the users database.
However, with GNU Radius things go the other way around.
The server reads the entire plaintext database, converts it into internal
form, and stores into a hash table, which provides for fast
access. Actually, using a DBM version of the users database slows
down the access unless the machine that runs the Radius daemon is
short of address space for the daemon to store the users database.
builddbm
utility attempts to
convert the file `raddb/users' to `raddb/users.db' or to
the pair
`raddb/users.pag', `raddb/users.dir', depending on the
version of the DBM library used.
If used with one argument, that argument is taken as the name of the plaintext database file to operate upon.
Use the following command line options to modify the operation of
buildbm
:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
radscm
: A Guile Interface to Radius Functions
radscm
is a Scheme interpreter based on Guile with the addition
of special functions and variables for communicating with
radiusd
. This chapter concentrates on the special features
provided by radscm
. Refer to Guile documentation for
information about Scheme and Guile (see section `Overview' in The Guile Reference Manual).
(list id-str host-str secret-str auth-num acct-num cntl-num) |
where the arguments are as follows:
id-str | Server ID |
host-str | Server hostname or IP |
secret-str | Shared secret key to use |
auth-num | Authentication port number |
acct-num | Accounting port number |
cntl-num | Control channel port number |
rad-client-set-server
or
rad-client-add-server
.
0 | Authentication port |
1 | Accounting port |
2 | Control port |
(cons attr-name-str value) |
(cons attr-number value) |
Return: On success,
(list return-code-number pair-list) |
'() |
rad-send-internal
,
but if verbose is specified, the verbose report about interaction with
the radius server is printed.
(list id-str host-str secret-str auth-num acct-num cntl-num) |
id-str | Server ID |
host-str | Server hostname or IP |
secret-str | Shared secret key to use |
auth-num | Authentication port number |
acct-num | Accounting port number |
cntl-num | Control channel port number |
(list id-str host-str secret-str auth-num acct-num cntl-num) |
where the elements are as follows:
id-str | Server ID |
host-str | Server hostname or IP |
secret-str | Shared secret key to use |
auth-num | Authentication port number |
acct-num | Accounting port number |
cntl-num | Control channel port number |
getpass(3)
function.
format
(see section `Formatted Output' in The Guile Reference Manual.)
format
.
pair is either
(cons name-str value) |
(cons attr-number value) |
(cons name-str value) |
(cons attr-number value) |
All Reply-Message
pairs from the list are concatenated and displayed
as one.
Reply-Message
pairs from
pair-list. If text is specified, it is printed before the
concatenated
text.
rad-server-list
, print its ID and hostname
or IP.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |