Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4608980
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:55:18+00:00 2026-05-22T00:55:18+00:00

I am using an LDAP – Active Directory to authenticate users for a project

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:55:19+00:00Added an answer on May 22, 2026 at 12:55 am

    To prevent student from being able to login via the new Staff authentication script, you can just change the base of you LDAP search. In spite of searching the UPN in the whole directoryn you searche the UPN from ou=MAS,ou=LAN,o=UNI.

    With LDIFDE.EXE it would give :

    ldifde -f c:\temp\user.ldf -d “ou=MAS,ou=LAN,o=UNI” -r “(userPrincipalName=login)”

    So the search don’t return anything if the user is a student.

    On absolute LDAP it exists a filter syntax called ExtensibleMatch which allow you to do that, but it does work in AD.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET application that authenticates users using Ldap against active directory. This
I am using python-ldap to try to authenticate against an existing Active Directory, and
Using ext/ldap I'm trying to add entries to an Active Directory. As long as
How do I authenticate against AD using Python + LDAP. I'm currently using the
I am currently using MediaWiki as a documentation website, with login authenticated by LDAP.
Our web applications are using LDAP Membership Provider to authenticate and register users in
I have an application that using ldap acegi-security-1.0.2.jar . I able to authenticate the
We have an SELinux client that authenticates network users using LDAP connecting to an
In my application I'm using LDAP authentication. But i'm also have 2 remote services
I have a database with LDAP login enabled. It works fine when logging in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.