Thank for the quick reply.
So, I was successfully able to setup AD with ldap with the following config, my only issue is I still cannot assign the different vlan based on the group they are on.
I need the following to be setup:
1. WIFI Student --> VLAN 93
2. Ethernet Student --> VLAN 3
3. WIFI Staff --> VLAN 94
4. Ethernet Staff --> VLAN 4
I was able to do it in the inner file with the following, but this is OU container not with the group and also can you filter WIFI vs LAN connect in here? :
if (control:Ldap-UserDn =~ /OU=Staff/) {
update reply {
Tunnel-Type:1 := 13
Tunnel-Medium-Type:1 := 6
Tunnel-Private-Group-Id:1 := 3
}
}
if (control:Ldap-UserDn =~ /OU=Student/) {
update reply {
Tunnel-Type:1 := 13
Tunnel-Medium-Type:1 := 6
Tunnel-Private-Group-Id:1 := 4
}
}
I notice you can define this in the users file, but I'm not sure if I got the syntax right.
Should it be -- >Ldap-Group == "CN=Student", which doesn't work either or am I doing something wrong here? How do I lookup the group they are in using ldap-group? or do I use Ldap-UserDn ?
Thanks
Here is my users file config:
DEFAULT Ldap-Group == "OU=Student", NAS-Port-Type ==19
Tunnel-Type := 13,
Tunnel-Medium-Type := 6,
Tunnel-Private-Group-ID := 93,
Fall-Through := No
DEFAULT Ldap-Group == "OU=Student"
Tunnel-Type := 13,
Tunnel-Medium-Type := 6,
Tunnel-Private-Group-ID := 4,
Fall-Through := No
DEFAULT Ldap-Group == "OU=Staff", NAS-Port-Type ==19
Tunnel-Type := 13,
Tunnel-Medium-Type := 6,
Tunnel-Private-Group-ID := 94,
Fall-Through := No
DEFAULT Ldap-Group == "OU=Staff"
Tunnel-Type := 13,
Tunnel-Medium-Type := 6,
Tunnel-Private-Group-ID := 4,
Fall-Through := No
Here is my Ldap config, if anyone decides to try ldap to AD:
ldap {
server = "xxx.xxx.xxx"
identity = "cn=xxxxx,cn=Users,dc=lcs,dc=on,dc=ca"
password = "xxxxxxx"
basedn = "dc=xxx,dc=xxx,dc=xxx"
filter = "(sAMAccountName=%{%{Stripped-User-Name}:-%{User-Name}})"
groupmembership_attribute = memberOf
ldap_connections_number = 5
timeout = 40
timelimit = 30
net_timeout = 10
tls {
start_tls = no
}
dictionary_mapping = ${confdir}/ldap.attrmap
edir_account_policy_check = no
groupname_attribute = cn
groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{control:Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{control:Ldap-UserDn})))"
groupmembership_attribute = memberOf
chase_referrals = yes
rebind = yes
ldap_debug = 0x0028
keepalive {
idle = 60
probes = 3
interval = 3
}
}
Date: Mon, 8 Sep 2014 09:39:02 +0100
Subject: Re: Freeradius-Users Digest, Vol 113, Issue 26
From: ruyrybeyro@gmail.com
To: freeradius-users@lists.freeradius.org
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html