Grab caller id and insert into radcheck how to
Jonathan De Graeve
Jonathan.De.Graeve at imelda.be
Fri Oct 7 14:46:31 CEST 2005
You should use: IF NOT EXISTS
--
Jonathan De Graeve
Network/System Administrator
Imelda vzw
Informatica Dienst
015/50.52.98
Jonathan.de.graeve at imelda.be
-----Oorspronkelijk bericht-----
Van: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] Namens Shane Hart
Verzonden: vrijdag 7 oktober 2005 13:22
Aan: FreeRadius users mailing list
Onderwerp: Grab caller id and insert into radcheck how to
Hi all,
I an attempting to add an additional attribute upon the first login for
user accounts and I am a bit lost.
The way I am testing this is with postauth query.
postauth_query = "INSERT into ${authcheck_table} (id, UserName,
Attribute, op, value) values('', '%{SQL-User-Name}',
'Calling-Station-Id', '==', '%{Calling-Station-Id}' )"
This works great but it adds a new record every time the user
successfully authenticates. Not a problem really but there are also
users I don't need to lock to a caller id.
I tried using postauth_query = "UPDATE in various ways but I just can't
get my head around it.
If I manually create an entry in radcheck for a user with the attribute
"Calling-Station-Id" and a "NULL" value, then the user can't login
obviously.
Does anybody have any ideas how to have this attribute somehow
dynamically created when the user first logs in if they are a member of
a group and ultimately not create it if the record already exists?
Any ideas or pointers greatly appreciated.
Thanks
Shane
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list