Reputation: 751
Good morning everyone,
I need to check if a user exists in a Radius Server. I am not sure if this question can be answered by the server (I am new to Radius).
I have a java application, and I am using "TinyRadius", in particular RadiusClient
from here.
I could not find a function in the API of this client to answer my question. Basically, I have the username (but no password) and I want to know if the user exists and is still active.
Can Radius server answer this question? If "TinyRadius" does not have the proper API, is there another Java library that can help me?
Thanks everyone
Upvotes: 4
Views: 848
Reputation: 6065
There's no packet type in any of the RADIUS standards to indicate whether a user exists or not.
You could create a custom configuration that passed back a Reply-Message indicating whether a user existed.
In FreeRADIUSv4 configuration the policy might look like this:
recv Access-Request {
ldap
if (notfound) {
&reply.Reply-Message := 'notfound'
reject
} else {
&reply.Reply-Message := 'found'
accept
}
}
Upvotes: 0