You've given me a lot of effort. What you say makes a lot of sense, but where to make changes, which files and lines. Can you elaborate? Thanks. Regards 2018-02-08 1:00 GMT+03:00 Alan Buxey <alan.buxey@gmail.com>:
okay...this is quite easy
so, in the authorise section of the main server, you cre just calling
db1 db2
this means you are checking whether a user is in db1....if so great...but then you are then falling through to db2 and checking there okay
1) thats okay if theres unique users in each db...not so great if you have a match in one and then a clash with same name in the other.... so you may want to skip db2 if db1 gives an answer
HOWEVER, your problem is that you are then doing the same thing for the post-auth and the detail log etc etc -
ie you are slapping details into db1....and THEN doing the same with db2
this is why info is going into both databases.
what you need to do is upon getting a value from db1 in the authorise section, you need to set a local variable eg create a local dictionary value in dictionary-file eg MYDATABASEANSWER and then set that value to 1 if the answer was from db1, or set it to 2 if the answer was from db2
THEN you wrap a protector around your detail/log/post-auth clauses eg
if(&MYDATABASEANSWER=1) { db1 } if(&MYDATABASEANSWER=2){ db2 }
(you could use an if/else construct instead....its up to you and how many databases you are going to end up with)
read the unlang man page for further info on server logic.
http://freeradius.org/radiusd/man/unlang.html
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html