On Wednesday 23 July 2003 8:31 am, Sinisa Burina wrote: > > From: "Alan DeKok" <[EMAIL PROTECTED]> > > > > "Sinisa Burina" <[EMAIL PROTECTED]> wrote: > > > accounting) by external scripts, with custom MySQL database in the > > > background that holds all the information and flags for ADSL/VPN > > > accounts. > > > > FreeRADIUS can do this without running external scripts. > > I'm still puzzled - do I _have_ to follow proposed MySQL DB structure with > attributes and operatirs, or there is a way to use my existing structure > which is conceptually very different and is not to be changed? Let's leave > all the rest on the side, and see how to authenticate the user against > plaintext password stored in one simple MySQL table with only two fields: > "user" and "pass", using FR integrated features. A simple example would be > very appreciated! :-) Please?
I'll jump in here with a suggestion -- it took a while for it to sink in for
me, so perhaps this will help someone else stay afloat...
The sql statements given in the EXAMPLE configuration files are EXAMPLES.
Once you catch on to that idea, it becomes obvious that instead of the "given"
SQL statement of:
SELECT id,UserName,Attribute,Value,op
FROM ${authcheck_table}
WHERE Username = '%{SQL-User-Name}' ORDER BY id"
You can "fake it" somewhat with
SELECT id,user as username,"Password" as attribute,
password as value,"==" as op
FROM ${authcheck_table}...
in this example, I'm presuming actual field names of "user" and "password",
which need to correspond to the names "username" and "value" as required by
the internals of the program [err, hope I have that part right] Likewise,
this returns hard-coded field values of the word "password" and an operator
of "==" for the attribute and op fields.
The downside, of course, is that no other attributes can be checked... [though
I suppose you could put those in another table and/or query and/or SQL
definition...]
--
Yet another Blog: http://osnut.homelinux.net
pgp00000.pgp
Description: signature
