php - ceck client status
Hi, I'd like to wrie few php script to manage users sessions Are there any posibility to ask freeradius, like nas does it, about client status? some virutal servers which can answer? for example. I'd like to know if client bob is logged still? that i send to freeradius pacect acc-status-client=bob, and FR aswer yes or no. something in that way. -- Regards Marcin / nicraM
On Mar 30, 2015, at 3:25 PM, Marcin <marcin@nicram.net> wrote:
Are there any posibility to ask freeradius, like nas does it, about client status?
Do you mean *end user* status? If so, put the user information into a database, and query that.
some virutal servers which can answer? for example. I'd like to know if client bob is logged still? that i send to freeradius pacect acc-status-client=bob, and FR aswer yes or no. something in that way.
Use a database. See the "accounting" configuration, and the SQL module. Alan DeKok.
2015-03-30 21:28 GMT+02:00 Alan DeKok <aland@deployingradius.com>:
On Mar 30, 2015, at 3:25 PM, Marcin <marcin@nicram.net> wrote:
Are there any posibility to ask freeradius, like nas does it, about client status?
Do you mean *end user* status? If so, put the user information into a database, and query that.
I'd like to avoid using any database. hence my question -- Regards Marcin / nicraM
but freeradius stores loged user in radutmp. radwho shows who is logged and I'd like to use in php. 2015-03-30 21:35 GMT+02:00 Alan DeKok <aland@deployingradius.com>:
On Mar 30, 2015, at 3:32 PM, Marcin <marcin@nicram.net> wrote:
I'd like to avoid using any database. hence my question
FreeRADIUS is a RADIUS server. It's not a database.
If you want to keep a database of users, put that information into a database.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Pozdrawiam Marcin / nicraM
In sites is status server. Can it answer about logged users? 30 mar 2015 21:42 "Marcin" <marcin@nicram.net> napisał(a):
but freeradius stores loged user in radutmp. radwho shows who is logged and I'd like to use in php.
2015-03-30 21:35 GMT+02:00 Alan DeKok <aland@deployingradius.com>:
On Mar 30, 2015, at 3:32 PM, Marcin <marcin@nicram.net> wrote:
I'd like to avoid using any database. hence my question
FreeRADIUS is a RADIUS server. It's not a database.
If you want to keep a database of users, put that information into a database.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Pozdrawiam Marcin / nicraM
I've started status server and I'm doing something like this: #v+ echo "Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Client, Response-Packet-Type = Status-Client, User-Name = bobpppoe" | radclient -x localhost:18121 status adminsecret Sent Status-Server Id 228 from 0.0.0.0:54937 to 127.0.0.1:18121 length 60 Message-Authenticator = 0x00 FreeRADIUS-Statistics-Type = Client Response-Packet-Type = Status-Client User-Name = 'bobpppoe' Received Access-Accept Id 228 from 127.0.0.1:18121 to 0.0.0.0:0 length 20 (0) -: Expected Status-Client got Access-Accept #v- How ask radius about user? 2015-03-31 7:22 GMT+02:00 Marcin <marcin@nicram.net>:
In sites is status server. Can it answer about logged users? 30 mar 2015 21:42 "Marcin" <marcin@nicram.net> napisał(a):
but freeradius stores loged user in radutmp. radwho shows who is logged and I'd like to use in php.
2015-03-30 21:35 GMT+02:00 Alan DeKok <aland@deployingradius.com>:
On Mar 30, 2015, at 3:32 PM, Marcin <marcin@nicram.net> wrote:
I'd like to avoid using any database. hence my question
FreeRADIUS is a RADIUS server. It's not a database.
If you want to keep a database of users, put that information into a database.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Pozdrawiam Marcin / nicraM
-- Pozdrawiam Marcin / nicraM
You are going about this wrong. Configure FR to use a database and then all the things you need are available now with very basic php Otherwise you're looking at writing a socket listener on the server end reading radwho output. The radutmp/wtmp files are very inefficient too. Alan
participants (3)
-
Alan Buxey -
Alan DeKok -
Marcin