Re: Stripping Realms from SQL Accounting Queries
Perhaps do what is suggested wherever you care to look (this list, documentation, website, ...) - run server in debug mode (radiusd -X). Then you will see exactly what is happening.
I did that, and it didn't help. I added a realm definition back in to the config file, and here's the debug output now:
[suffix] Looking up realm "soe.ucsc.edu" for User-Name = "tjg@soe.ucsc.edu" [suffix] Found realm "soe.ucsc.edu" [suffix] Adding Stripped-User-Name = "tjg" [suffix] Adding Realm = "soe.ucsc.edu" [suffix] Authentication realm is LOCAL.
So far so good...
[ldap] performing user authorization for tjg [ldap] WARNING: Deprecated conditional expansion ":-". See "man unlang" for details [ldap] expand: (uid=%{Stripped-User-Name:-%{User-Name}}) -> (uid=tjg) [ldap] expand: dc=soe,dc=ucsc,dc=edu -> dc=soe,dc=ucsc,dc=edu
Depreciated syntax aside, we're still doing good...
[sql] WARNING: Deprecated conditional expansion ":-". See "man unlang" for details [sql] expand: insert into RadiusLog (SessionID, UserName, WapIpAddress, UserMacAddress, StartTime) value ('%{Acct-Session-Id}', '%{Stripped-User-Name:-%{User-Name}}', '%{NAS-IP-Address}', '%{Calling-Station-Id}', '%S') -> insert into RadiusLog (SessionID, UserName, WapIpAddress, UserMacAddress, StartTime) value ('0004F8C5', 'tjg@soe.ucsc.edu', '192.168.32.8', '0024.2b58.2f46', '2009-11-23 14:13:42')
Doh, no dice! Incidentally, as I mentioned in another reply a few minutes ago, using %{SQL-User-Name} instead of %{User-Name} results in an empty string, and using only %{Stripped-User-Name} also results in an empty string. If you really would like me to, I suppose I could get you the whole debug output, but it's a few thousand lines for a single authorization. Tim Gustafson Baskin School of Engineering UC Santa Cruz tjg@soe.ucsc.edu 831-459-5354
Perhaps do what is suggested wherever you care to look (this list, documentation, website, ...) - run server in debug mode (radiusd -X). Then you will see exactly what is happening.
I did that, and it didn't help. I added a realm definition back in to the config file, and here's the debug output now:
No, just a small snip of it.
Doh, no dice! Incidentally, as I mentioned in another reply a few minutes ago, using %{SQL-User-Name} instead of %{User-Name} results in an empty string,
That doesn't make much sense. SQL-User-Name *is* User-Name by default. At least in recent versions.
and using only %{Stripped-User-Name} also results in an empty string.
Most likely suffix and sql module outputs are not from processing same request.
If you really would like me to, I suppose I could get you the whole debug output, but it's a few thousand lines for a single authorization.
Yes, we would *really* like you too! "If you want help on the list, post the debug" is not written in README, FAQ and almost daily on this list because it's someones idea of a joke. If you don't know or are not sure which parts of the debug are relevant - post the whole thing (including startup). Nobody will say anything bad about it. Ivan Kalik
participants (2)
-
Tim Gustafson -
tnt@kalik.net