Problems with radzap: radclient:: failed to get value
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm trying to run a radzap and having no luck. For example, if I try: radzap -d /etc/raddb -N $NAS_IP -P 1 -u las $NAS_IP $NAS_PW radclient:: failed to get value radclient: Nothing to send. I've also tried it with the NAS name ("52a2", from /etc/raddb/naslist) rather than IP: radzap -d /etc/raddb -N $NAS_IP -P 1 -u las 52a2 $NAS_PW radclient: Failed to find IP address for host 52a2: Success If I run radwho: radwho -ZR -N 216.138.63.130 -P 1 -u las I get a reasonable-looking: User-Name = "las" Acct-Session-Id = "000001C1" Acct-Status-Type = Stop NAS-IP-Address = $NAS_IP NAS-Port = 1 Service-Type = Framed-User Framed-Protocol = PPP Framed-IP-Address = Acct-Session-Time = 239370 However, if I pipe that through radclient: radclient -x -d /etc/raddb -f - $NAS_IP acct $NAS_PW I get the error above: radclient:: failed to get value radclient: Nothing to send. I've been trying various combinations of both the output of radwho, and commands for radclient to log a user out, based on searches on the Internet including things like sending the "packet of disconnect" (PoD), including things on this page: http://wiki.freeradius.org/Disconnect_Messages including trying sending to ports 1700 and 3799, using commands like "disconnect" and "40", using packets like: Acct-Session-Id = "000001C1" User-Name = "las" NAS-IP-Address = $NAS_IP Using the above packet looks most promising, in that I don't get an error, it just hangs a few seconds and then fails with "no response from server for ID 141 socket 3" or similar. Any pointers on this? The version of FreeRADIUS is 2.1.10 from CentOS. There are a couple of micro version updates I could do, but I didn't see any mention in the changelog of anything related to this issue being resolved. Thanks, Sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFO774BxUhyMYEjVX0RAu4aAJ0R/vUb8XSKO2J0lCW9UKsq0jUgVwCeJF7a 8wxcDliE2oHyfqtDzJrgA00= =II6m -----END PGP SIGNATURE-----
Hi,
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I'm trying to run a radzap and having no luck. For example, if I try:
radzap -d /etc/raddb -N $NAS_IP -P 1 -u las $NAS_IP $NAS_PW radclient:: failed to get value radclient: Nothing to send.
I've also tried it with the NAS name ("52a2", from /etc/raddb/naslist) rather than IP:
radzap -d /etc/raddb -N $NAS_IP -P 1 -u las 52a2 $NAS_PW radclient: Failed to find IP address for host 52a2: Success
If I run radwho:
radwho -ZR -N 216.138.63.130 -P 1 -u las
man radzap radzap [-d raddb_directory] [-h] [-N nas_ip_address] [-P nas_port] [-u user] [-U user] [-x] server[:port] secret you talk to the server using the servers secret....not the NAS with the NAS secret, so send a radzap command to your FR server with its secret from the session you are on (eg on localhost thats testing123 by default..) alan
On 12/19/2011 04:03 PM, Alan Buxey wrote:
you talk to the server using the servers secret....not the NAS with the NAS secret, so send a radzap command to your FR server with its secret from the session you are on (eg on localhost thats testing123 by default..)
Ah hah, ok, thanks! This pointer plus the pointer from one of my associates that it doesn't actually log the user out, it just modifies the radutmp. The problem ended up being (beyond trying to talk to the NAS rather than the server): We had both radutmp and sradutmp defined, so it was writing to both locations. "radwho -R" is reporting a blank "Framed-IP-Address =" line, which causes radclient to choke (that was the source of the "failed to get value" messages). So, if I modify the "radzap" script to "grep -v '^Framed-IP-Address'", that should work. Thanks! Sean
participants (2)
-
Alan Buxey -
Sean Reifschneider