radwho is not working
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
Angel L. Mateo wrote:
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:
Run the server in debugging mode. The radutmp file needs certain information to create an entry, and if that information isn't in the accounting packet, it can't create an entry. Debugging mode WILL show you this. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
El jue, 04-01-2007 a las 05:16 -0800, Alan DeKok escribió:
Angel L. Mateo wrote:
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:
Run the server in debugging mode. The radutmp file needs certain information to create an entry, and if that information isn't in the accounting packet, it can't create an entry.
Debugging mode WILL show you this.
But, if this was the problem, why freeradius updates the file? (I have checked that the file is modified every time freeradius makes an authentication) -- 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
Angel L. Mateo wrote:
But, if this was the problem, why freeradius updates the file? (I have checked that the file is modified every time freeradius makes an authentication)
Does debugging mode show "radutmp returns noop"? If so, nothing new was written. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
El sáb, 06-01-2007 a las 00:02 -0500, Alan DeKok escribió:
Angel L. Mateo wrote:
But, if this was the problem, why freeradius updates the file? (I have checked that the file is modified every time freeradius makes an authentication)
Does debugging mode show "radutmp returns noop"? If so, nothing new was written.
Hello, I continue with this problem. radwho doesn't display any connection, although I am sure I have a lot. I have checked that debug doesn't display any "radutmp returns noop" and I haven't got any line as this. I have also checked that RASes are sending the accounting info. As long as I can see I think it is, because we have a lot of "Acct-Status-Type = Start" (and Stop) entries in my detail files. For example, this is the debug of an accounting packet I am receiving: rad_recv: Accounting-Request packet from host 155.54.213.20:1440, id=235, length=135 User-Name = "rociogon@um.es" NAS-Port = 28167 Service-Type = Framed-User Framed-Protocol = PPP Framed-IP-Address = 155.54.194.77 Class = "rpvum" Calling-Station-Id = "147.84.74.78" Acct-Status-Type = Start Acct-Session-Id = "FA904B8A" Tunnel-Client-Endpoint:0 = "147.84.74.78" Acct-Authentic = RADIUS Acct-Delay-Time = 0 NAS-IP-Address = 155.54.213.20 NAS-Port-Type = Virtual Processing the preacct section of radiusd.conf modcall: entering group preacct for request 2 modcall[preacct]: module "preprocess" returns noop for request 2 rlm_acct_unique: Hashing 'NAS-Port = 28167,Client-IP-Address = 155.54.213.20,NAS-IP-Address = 155.54.213.20,Acct-Session-Id = "FA904B8A",User-Name = "rociogon@um.es"' rlm_acct_unique: Acct-Unique-Session-ID = "62eeb2626cd2e4c0". modcall[preacct]: module "acct_unique" returns ok for request 2 rlm_realm: Looking up realm "um.es" for User-Name = "rociogon@um.es" rlm_realm: Found realm "um.es" rlm_realm: Adding Stripped-User-Name = "rociogon" rlm_realm: Proxying request from user rociogon to realm um.es rlm_realm: Adding Realm = "um.es" rlm_realm: Accounting realm is LOCAL. modcall[preacct]: module "suffix" returns noop for request 2 modcall[preacct]: module "files" returns noop for request 2 modcall: leaving group preacct (returns ok) for request 2 Processing the accounting section of radiusd.conf modcall: entering group accounting for request 2 radius_xlat: '/var/log/freeradius/radacct/155.54.213.20/detail-20070205' rlm_detail: /var/log/freeradius/radacct/%{Huntgroup-Name:-%{Client-IP-Address}}/detail-%Y%m%d expands to /var/log/freeradius/radacct/155.54.213.20/detail-20070205 modcall[accounting]: module "detail" returns ok for request 2 modcall[accounting]: module "unix" returns ok for request 2 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: 'rociogon@um.es' modcall[accounting]: module "radutmp" returns ok for request 2 rlm_ippool: This is not an Accounting-Stop. Return NOOP. modcall[accounting]: module "pool_vpn" returns noop for request 2 rlm_ippool: This is not an Accounting-Stop. Return NOOP. modcall[accounting]: module "pool_vpn_alu" returns noop for request 2 rlm_ippool: This is not an Accounting-Stop. Return NOOP. modcall[accounting]: module "pool_ono" returns noop for request 2 rlm_ippool: This is not an Accounting-Stop. Return NOOP. modcall[accounting]: module "pool_ono_alu" returns noop for request 2 rlm_sql_log (sql_log): Processing sql_log_accounting radius_xlat: 'INSERT INTO radacct (AcctSessionId, UserName, ?? RealUserName, ?? NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, ?? AcctSessionTime, AcctTerminateCause) VALUES ?? ('FA904B8A', 'rociogon@um.es', ?? 'rpvum', '155.54.213.20', ?? '155.54.194.77', '2007-02-05 10:40:41', '0', '0', '');' radius_xlat: '/var/log/freeradius/radacct/sql-relay' modcall[accounting]: module "sql_log" returns ok for request 2 modcall: leaving group accounting (returns ok) for request 2 Sending Accounting-Response of id 235 to 155.54.213.20 port 1440 Finished request 2 I think it is recording the entry because I can see it in the detail file and I can see a line "modcall[accounting]: module "radutmp" returns ok for request 2" in this debug log. But radwho still displays nothing. My configuration is: ... modules { ... unix { cache = no cache_reload = 600 shadow = /etc/shadow radwtmp = ${logdir}/radwtmp } ... detail { detailfile = ${radacctdir}/%{Huntgroup-Name:-%{Client-IP-Address}}/detail-%Y%m%d detailperm = 0600 } detail auth_log { detailfile = ${radacctdir}/%{Huntgroup-Name:-%{Client-IP-Address}}/auth-detail-%Y%m%d detailperm = 0600 } ... radutmp { filename = ${logdir}/radutmp username = %{User-Name} case_sensitive = yes check_with_nas = yes perm = 0600 callerid = "yes" } radutmp sradutmp { filename = ${logdir}/sradutmp perm = 0644 callerid = "no" } ... } ... accounting { detail unix radutmp pool_vpn pool_vpn_alu pool_ono pool_ono_alu sql_log } session { radutmp } 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
Hello, More info about my problem... In the radius.log file I have a lot of entries of the form: Tue Feb 13 12:12:13 2007 : Error: rlm_radutmp: Logout for NAS ap port 1627, but no Login record Tue Feb 13 12:12:35 2007 : Error: rlm_radutmp: Logout for NAS ap port 3100, but no Login record Tue Feb 13 12:12:46 2007 : Error: rlm_radutmp: Logout for NAS ap port 8726, but no Login record -- 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
El mar, 13-02-2007 a las 12:14 +0100, Angel L. Mateo escribió:
Hello,
More info about my problem... In the radius.log file I have a lot of entries of the form:
Tue Feb 13 12:12:13 2007 : Error: rlm_radutmp: Logout for NAS ap port 1627, but no Login record Tue Feb 13 12:12:35 2007 : Error: rlm_radutmp: Logout for NAS ap port 3100, but no Login record Tue Feb 13 12:12:46 2007 : Error: rlm_radutmp: Logout for NAS ap port 8726, but no Login record
Hello, Another mistery of computers... I have changed from freeradius 1.1.2 to freeradius 1.1.3 and now it works with the same configuration. I don't know the reason, but now it works. -- 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
On Fri 16 Feb 2007 15:52, Max Jonborn wrote:
Hi!
What does the TTY stand for when i do a "radwho"? //Max
The same thing it stands for when you type "who" or "w" :-) Cheers -- Peter Nixon http://www.peternixon.net/ PGP Key: http://www.peternixon.net/public.asc
Hi! Thank you for your answer! I'm guessing these are pseudo-ttys. The thing is, ive never seen it go past S128, is there a limit? Howcome 128? I have 256 pseudo-ttys. Cheers! //M -----Original Message----- From: freeradius-users-bounces+max.jonborn=labs2.com@lists.freeradius.org [mailto:freeradius-users-bounces+max.jonborn=labs2.com@lists.freeradius. org] On Behalf Of Peter Nixon Sent: den 17 februari 2007 09:25 To: FreeRadius users mailing list Subject: Re: radwho.. On Fri 16 Feb 2007 15:52, Max Jonborn wrote:
Hi!
What does the TTY stand for when i do a "radwho"? //Max
The same thing it stands for when you type "who" or "w" :-) Cheers -- Peter Nixon http://www.peternixon.net/ PGP Key: http://www.peternixon.net/public.asc - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
El vie, 16-02-2007 a las 13:16 +0000, A.L.M.Buxey@lboro.ac.uk escribió:
Hi,
I have changed from freeradius 1.1.2 to freeradius 1.1.3 and now it works with the same configuration. I don't know the reason, but now it works.
..bit 1.1.4 is current release ;-)
Yes, I know it, but 1.1.3 is the version provided in debian etch. -- 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
participants (5)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Angel L. Mateo -
Max Jonborn -
Peter Nixon