I am using an LDAP - Active Directory to authenticate users for a project of mine.
I currently have 2 login pages - 1 is intended for students, the other for staff.
I have managed to write an authentication script to bind to the LDAP server - this works for all users stored on the LDAP server.
Now i want to be able to filter out students from staff, allowing only staff to login via the "staff login page".
The DN looks something like the following:
cn=USERNAME,ou=DEPT,ou=MAS,ou=LAN,o=UNI <-- STAFF
cn=USERNAME,ou=DEPT,ou=STUDENT,ou=LAN,o=UNI <-- STUDENT
How can i go about filtering out ou=STUDENT or something to stop students from being able to login via the new Staff authentication script?
Thankyou