Updating nas-port after authentication
rgreiner
mrgreiner at gmail.com
Tue Dec 23 14:33:08 CET 2008
Hi,
I'm trying to update NAS-Port in the MySQL database after the user logs
in, using the postauth_query query.
The query I tried looks like this:
postauth_query = "UPDATE radcheck SET radcheck.value='%{NAS-Port}' \
WHERE radcheck.username = '%{User-Name}' \
and radcheck.attribute='NAS-Port'"
Before putting this line, I've inserted a line for each user in radcheck
with the contents being ('username', NAS-Port, =*,<empty for the value
field>). I'm using the '=*' operator just for the tests. I intend to
change that later to '=='.
I've uncommented the 'sql' line in the post-authentication section in
the config line, but nothing is happening in the database. I've tried to
change the 'postauth_table' entry in sql.conf to "radcheck", but still
nothing. If I put the postauth_query query back to it's original value
(and the entry in sql.conf too), it works fine, inserting one entry
after each login. Did I do something wrong, or is my idea for updating
the NAS-Port just insane? Should I go for unlang instead?
Thanks,
Roberto
--
-----------------------------------------------------
Marcos Roberto Greiner
Os otimistas acham que estamos no melhor dos mundos
Os pessimistas tem medo de que isto seja verdade
Murphy
-----------------------------------------------------
More information about the Freeradius-Users
mailing list