Thanks very much Phil. That works, I think it doesn't work in the hints file for the reasons you told me.
Now I've got a new problem. I use the radiusGroupName for making the users belong to VLAN1, VLAN2 or VLAN3. So I enable
groupmembership_attribute = radiusGroupName
but I left groupname_attribute and groupmembership_filter commented ( in each ldap module ).
In other file called users-vlan I defined this:
DEFAULT Ldap-Group == Local
stuff for assigning VLAN1
.....
The file that determine the users procedence is users-procedence:
DEFAULT NAS-IP-Address == 192.168.51.yy, Autz-Type=customer1
.....
The file that proxies ( users-proxy ):
DEFAULT proxy-to-realm:=CENTRAL
The authorization section:
....
users-procedence
autztype customer1{
redundant {
group {
ldap1 {
notfound = return
wekz wrote:
>
> I don't know if I have explain it correctly, if I haven't just tell me (
> I'm not an english speaker )
Your english is great.
> My hints file:
Nearly there. Try:
DEFAULT NAS-IP-Address == 192.168.xx.yy, Autz-Type := LDAPx
I'm not sure that'll work in a hints file - so you may need to use a
"users" file - hints puts items into the request pairs, Autz-Type needs
to go into the configure pairs.
Try this:
modules {
# other stuff
files filesFirst {
usersfile = ${confdir}/usersFirst
}
}
authorize {
preprocess
filesFirst
Autz-Type LDAP1 {
# stuff here
ldap1
}
# other LDAP modules
}
And in ${confdir}/usersFirst:
DEFAULT NAS-IP-Address == 192.168.51.xx, Autz-Type := LDAP1
DEFAULT NAS-IP-Address == 192.168.51.yy, Autz-Type := LDAP2
...and so on.
The other slightly simpler way might be to use a "passwd" (badly named)
module, e.g.:
modules {
passwd nas2autz {
filename = ${confdir}/nas2autz
format = "*NAS-IP-Address:Autz-Type"
# set to 0 to read file on every request - slow
# but instant-updates
hashsize = 100
}
}
authorize {
preprocess
nas2autz
Autz-Type LDAP1 {
ldap1
}
# other Autz
}
...and in ${confdir}/nas2autz
192.168.51.xx:LDAP1
192.168.51.yy:LDAP2
Hope that helps
Phil
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html