radwho is not working
Angel L. Mateo
amateo at um.es
Thu Jan 4 12:08:43 CET 2007
Hello,
I have a problem with radwho and it is not working, it shows an empty
list of users.
I have two freeradius servers with the same configuration (running in
an active/standby configuration). I have configure unix (radwtmp) and
radutmp modules, I have configure accounting to use both unix and
radutmp modules and session to use radutmp.
I have also configure sql_log module so both servers logs accounting
information to a share backend.
So my configuration is:
modules {
...
# Unix /etc/passwd style authentication
#
unix {
cache = no
cache_reload = 600
shadow = /etc/shadow
radwtmp = ${logdir}/radwtmp
}
# Write a 'utmp' style file, of which users are currently
# logged in, and where they've logged in from.
#
# This file is used mainly for Simultaneous-Use checking,
# and also 'radwho', to see who's currently logged in.
#
radutmp {
filename = ${logdir}/radutmp
username = %{User-Name}
case_sensitive = yes
check_with_nas = yes
perm = 0600
callerid = "yes"
}
#
# The rlm_sql_log module appends the SQL queries in a log
# file which is read later by the radsqlrelay program.
#
# This module only performs the dynamic expansion of the
# variables found in the SQL statements. No operation is
# executed on the database server. (this could be done
# later by an external program) That means the module is
# useful only with non-"SELECT" statements.
#
# See rlm_sql_log(5) manpage.
#
sql_log {
path = ${radacctdir}/sql-relay
acct_table = "radacct"
postauth_table = "radpostauth"
Start = "INSERT INTO ${acct_table} (AcctSessionId,
UserName, \
RealUserName, \
NASIPAddress, FramedIPAddress, AcctStartTime,
AcctStopTime, \
AcctSessionTime, AcctTerminateCause) VALUES
\
('%{Acct-Session-Id}', '%{User-Name}', \
'%{Class}', '%{NAS-IP-Address}', \
'%{Framed-IP-Address}', '%S', '0', '0', '');"
Stop = "INSERT INTO ${acct_table} (AcctSessionId,
UserName, \
RealUserName, \
NASIPAddress, FramedIPAddress, AcctStartTime,
AcctStopTime, \
AcctSessionTime, AcctTerminateCause) VALUES
\
('%{Acct-Session-Id}', '%{User-Name}', \
'%{Class}', '%{NAS-IP-Address}', \
'%{Framed-IP-Address}', '0', '%S',
'%{Acct-Session-Time}', \
'%{Acct-Terminate-Cause}');"
Alive = "INSERT INTO ${acct_table} (AcctSessionId,
UserName, \
RealUserName, \
NASIPAddress, FramedIPAddress, AcctStartTime,
AcctStopTime, \
AcctSessionTime, AcctTerminateCause) VALUES
\
('%{Acct-Session-Id}', '%{User-Name}', \
'%{Class}, '%{NAS-IP-Address}', \
'%{Framed-IP-Address}', '0', '0',
'%{Acct-Session-Time}','');"
Post-Auth = "INSERT INTO ${postauth_table}
\
(user, pass, reply, date, ip) VALUES
\
('%{User-Name}', '%{User-Password:-Chap-Password}',
\
'%{reply:Packet-Type}', '%S',
'%{Client-IP-Address}' );"
}
}
accounting {
#
# Accounting. Log the accounting data.
#
accounting {
#
# Create a 'detail'ed log of the packets.
# Note that accounting requests which are proxied
# are also logged in the detail file.
detail
# Update the wtmp file
#
# If you don't use "radlast", you can delete this line.
unix
#
# For Simultaneous-Use tracking.
#
# Due to packet losses in the network, the data here
# may be incorrect. There is little we can do about it.
radutmp
# Return an address to the IP Pool when we see a stop record.
# amateo, 07/07/06: Activamos los pooles que hemos definido
pool_vpn
pool_vpn_alu
pool_ono
pool_ono_alu
#
# Instead of sending the query to the SQL server,
# write it into a log file.
#
sql_log
}
session {
radutmp
}
The problem I have is that although radumtp and radwmtp are updated
every time time radius authenticate an user, radwho shows an empty list,
but radlast shows information. For example, at this moment:
vulpes2:/etc/freeradius# radlast | more
anonymou 765:ap Thu Jan 4 12:06 still logged in
skarmeta 810:ap Thu Jan 4 12:05 still logged in
anonymou 939:ap Thu Jan 4 12:05 - 12:06 (00:00)
anonymou 1648:ap Thu Jan 4 12:05 still logged in
anonymou 1211:ap Thu Jan 4 12:03 still logged in
anonymou 1647:ap Thu Jan 4 12:02 - 12:05 (00:03)
anonymou 764:ap Thu Jan 4 12:02 - 12:05 (00:03)
skarmeta 837:ap Thu Jan 4 12:01 - 12:05 (00:03)
anonymou 938:ap Thu Jan 4 12:00 - 12:02 (00:01)
anonymou 1646:ap Thu Jan 4 11:59 - 12:02 (00:03)
anonymou 763:ap Thu Jan 4 11:58 - 12:00 (00:01)
skarmeta 809:ap Thu Jan 4 11:57 - 12:01 (00:03)
anonymou 1645:ap Thu Jan 4 11:57 - 11:59 (00:02)
anonymou 937:ap Thu Jan 4 11:56 - 11:58 (00:01)
anonymou 613:ap Thu Jan 4 11:55 - 12:00 (00:04)
anonymou 1644:ap Thu Jan 4 11:55 - 11:57 (00:02)
anonymou 762:ap Thu Jan 4 11:54 - 11:56 (00:01)
skarmeta 835:ap Thu Jan 4 11:53 - 11:57 (00:03)
anonymou 1643:ap Thu Jan 4 11:53 - 11:55 (00:02)
anonymou 1642:ap Thu Jan 4 11:51 - 11:53 (00:01)
anonymou 936:ap Thu Jan 4 11:50 - 11:54 (00:03)
anonymou 2668:ap Thu Jan 4 11:50 still logged in
skarmeta 808:ap Thu Jan 4 11:49 - 11:53 (00:03)
anonymou 1641:ap Thu Jan 4 11:49 - 11:51 (00:02)
anonymou 761:ap Thu Jan 4 11:48 - 11:50 (00:01)
...
as you can see, radlast shows that there are users logged in to teh
system, but
vulpes2:/etc/freeradius# radwho
Login Name What TTY When From Location
any idea?
--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información _o)
y las Comunicaciones Aplicadas (ATICA) / \\
http://www.um.es/atica _(___V
Tfo: 968367590
Fax: 968398337
More information about the Freeradius-Users
mailing list