Migrate from "files" to "sql" with multiple DEFAULT users

Robert Senger robert.senger at lists.microscopium.de
Tue May 30 08:55:41 PDT 2023


Hi there,

I am trying to migrate from users stored in the 'authorize' file to
users stored in a mysql database.

The 'sites-available/default' configuration file says:

"The schema of the database is meant to mirror the 'users' file."

Ok, this is fine with single users with known username. But what to do
if there is more than one DEFAULT user? The 'authorize' file says, that
it is processed by order, but this will not work in a database.

My config is like this, to allow different sets of passwords for
different SSIDs (staff and guests):

<...>

DEFAULT Auth-Type := ACCEPT, Called-Station-Id != "02-A5-04-3D-96-
13:Cassiopeia", Called-Station-Id != "02-A5-04-3D-96-23:Cassiopeia"
        Tunnel-Password = "passwordforuser1",
        Tunnel-Password = "passwordforuser2",
        Tunnel-Password = "passwordforuser3"

DEFAULT Auth-Type := ACCEPT, Called-Station-Id == "02-A5-04-3D-96-
13:Cassiopeia"
        Tunnel-Password = "passwordforguest1",
        Tunnel-Password = "passwordforguest2",
        Tunnel-Password = "passwordforguest3"

DEFAULT Auth-Type := ACCEPT, Called-Station-Id == "02-A5-04-3D-96-
23:Cassiopeia"
        Tunnel-Password = "passwordforguest1",
        Tunnel-Password = "passwordforguest2",
        Tunnel-Password = "passwordforguest3"

DEFAULT Auth-Type := Reject

<EOF>

I have no idea how to build this in the mysql database... Any
suggestions?

Thank you!

Robert


-- 
Robert Senger





More information about the Hostap mailing list