Skip to content
Tech Interview Prep
Technical interview guide

Directory Services (LDAP, Active Directory)

The centralized store of identities, groups, and attributes that most enterprise authentication and authorization builds on.

Read
45 min
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: LDAP RFC 4511/4513/4514/4515, Kerberos V5 RFC 4120, and current Microsoft AD DS, CISA, and NIST guidance reviewed 2026-09-04.

Curated: · Written: · Reviewed:

25 questions

MCQ-25A directory server holds these entries. Every entry has an explicit accountDisabled value, and objectClass is single-valued here. | DN | objectClass | department | title | accountDisabled | | --- | --- | --- | --- | --- | | cn=alice | user | Engineering | Engineer | FALSE | | cn=bob | user | Engineering | Lead Engineer | FALSE | | cn=carol | user | Marketing | Team Lead | FALSE | | cn=dave | user | Engineering | Lead | TRUE | | cn=erin | user | Sales | Engineer | FALSE | | cn=frank | contact | Engineering | Lead | FALSE | | cn=grace | user | Engineering | Lead | FALSE | An application sends this LDAP search: ``` (&(objectClass=user)(|(department=Engineering)(title=*Lead*))(!(accountDisabled=TRUE))) ``` Which entries does the server return?
MCQ-3A login service builds its search filter as `(uid=" + input + ")` and binds as the first entry the directory returns. A pentester submits `*` and is logged in as an arbitrary user, because `(uid=*)` matches all 200,000 entries. The team adds an escaper and points it at an RFC 4515-compliant directory. For the input `a*b(c)\d`, which escaped value makes the filter match only the entry whose uid is exactly `a*b(c)\d`?
MCQ-2An LDAP-backed application stores each user's distinguished name (DN) as the primary key in its `app_user` table. Alice's entry is `uid=alice,ou=sales,dc=example,dc=com`. HR moves her to `uid=alice,ou=engineering,dc=example,dc=com` with a modify DN operation; the directory keeps her `entryUUID` unchanged. After the move, the application's login lookup by the stored DN returns no entry, so it provisions a second `app_user` row for Alice. Which change fixes the durable-key problem for this move and future renames?
MCQ-6Contoso runs a single AD domain. Manila helpdesk staff must be able to reset passwords for Manila users only, and a new GPO must apply only to Manila laptops. The directory team must not grant rights over users in other regions. Which structure meets both requirements?
MCQ-18A helpdesk group is delegated Reset Password on OU=Staff, scoped to descendant User objects. It works for the 4,000 users under OU=Staff. Dana's account is then moved from OU=Staff to OU=Contractors, a sibling OU directly under the domain root. Helpdesk can no longer reset Dana's password. Which explanation matches how AD evaluates the ACL?
MCQ-7An access review queries AD with `(memberOf=CN=Payroll-Readers,OU=Groups,DC=corp,DC=example,DC=com)` and returns 12 users. A later test shows Sam, whose only direct group is `Payroll-Readers-Temp`, can read a payroll file whose ACL grants read to `Payroll-Readers`. `Payroll-Readers-Temp` is a member of `Payroll-Readers`. Which explanation best accounts for the discrepancy?
MCQ-17An AD forest has three domains: corp.example.com, emea.corp.example.com and apac.corp.example.com. The directory team adds a custom string attribute, corpBadgeID, to the schema and writes it onto user objects in apac with a successful LDAP modify; the value has not changed in a year. An application binds with a service account that holds full read on every domain partition and searches the global catalog in corp.example.com on port 3268, base DC=apac,DC=corp,DC=example,DC=com. The result returns mail and sAMAccountName for the apac user but no corpBadgeID. The same search against the apac domain controller on port 389 returns corpBadgeID. What explains the missing value?
MCQ-14A nightly org-chart sync binds to Active Directory as `svc-orgchart` and runs a subtree search under `DC=corp,DC=example,DC=com` for `(objectClass=user)`, reading `sAMAccountName`, `displayName`, `department` and `manager`, and builds a DN-to-displayName map from the results. The directory team grants the account Read on `OU=Employees` only. The sync returns all 8,000 employees in `OU=Employees` with `sAMAccountName`, `displayName` and `department`, but the `manager` field is empty for the 1,200 employees whose manager DN points into `OU=Contractors` or `OU=Executives`. No LDAP error is logged. Security requires the narrowest grant that makes the sync complete. What should the directory team change?
MCQ-16An identity sync walks a 2.4 million entry directory with simple paged results (RFC 2696), page size 500, over one connection held open for the whole walk, sorted on a unique attribute. While it runs, a provisioning batch adds 12,000 entries and deletes 800 under the base DN. The client sends back each cookie the server returns, every page comes back with success and a full 500 entries, and the walk ends on the empty final cookie. Reconciliation reports 3,100 entries never returned, 900 returned twice, and many of the missing entries were created months before the walk started. What explains the result?
MCQ-15A nightly sync job binds to ldaps://dir.corp.example:636 as cn=svc-sync,ou=service,dc=corp,dc=example with a simple bind, then searches the subtree dc=corp,dc=example. The directory holds a referral entry pointing at ldap://partner.example.net/dc=partner,dc=example, and the client library is configured to chase referrals. After the partner's migration, the job's log shows 4,100 entries returned, 300 of them under dc=partner,dc=example, and the partner's directory log shows a bind from cn=svc-sync,ou=service,dc=corp,dc=example. What explains the result?
MCQ-1A Java provisioning service writes passwords into AD DS. It binds with a simple bind as a service account holding Write on the target user objects, then sends a modify replacing unicodePwd. Against one domain controller on port 389 the modify is rejected with resultCode 53 (unwillingToPerform). The same code, the same bind and the same value against the same domain controller on port 636 with TLS succeed. What explains the difference?
MCQ-20Contoso runs six domain controllers behind a single LDAP VIP on port 389. After 'Domain controller: LDAP server signing requirements' is set to Require signing on all six, 11 of the company's 140 applications fail to bind with LDAP error 8 (strongAuthRequired). All 11 use simple bind with a DN and password; the other 129 bind with Kerberos (Negotiate) SASL and are unaffected. The 11 are vendor-supplied and their bind code cannot be changed. Which change restores the 11 while keeping the requirement in force on all six DCs?
MCQ-4A penetration tester sits on-path between an internal app and the directory. The app connects with `ldap://` on port 389, issues StartTLS, and binds a service account with simple bind; the client is configured with `TLS_REQCERT never`. The tester captures the service account password in cleartext. What explains the capture?
MCQ-5A monitoring agent connects to an LDAP directory on port 389 with StartTLS required. A packet capture filtered to one TCP connection shows, in order: the StartTLS extended request, the server's success extended response, a BindRequest carrying the service account DN and password in cleartext, and then the TLS ClientHello. The bind succeeds and the agent reports a healthy connection. What does the capture show?
MCQ-8`svc/reports@CORP.EXAMPLE` is a Kerberos-authenticated HTTP service. Its middleware allows `GET /reports/all` whenever the request carries a valid, unexpired service ticket for `svc/reports`, and returns 403 otherwise. A pentester signs in with an ordinary employee account that holds no reports role and gets 200 with the full report list. The team's fix is to require a ticket for a second service principal, `svc/reports-admin`, and to configure only the reports team's workstations to request that SPN. The pentester retries from their own workstation. What happens?
MCQ-11An Active Directory domain has a SQL Server service on host SQL01 running under the domain user account svc_sql. The SPN MSSQLSvc/sql01.corp.example:1433 is registered on svc_sql. An administrator also adds the same SPN to the computer account SQL01$. Immediately afterward, clients report that Kerberos authentication to SQL01 succeeds on some connections and fails with KRB_AP_ERR_MODIFIED on others, falling back to NTLM. The svc_sql password has not changed and no other accounts have that SPN. What explains the pattern?
MCQ-9A host app-17 obtained a TGT at 09:00. At 09:10 its NTP daemon stopped and the clock drifted 7 minutes fast. At 09:20 it tries to use the TGT to request a service ticket; the KDC rejects the TGS-REQ with 'Clock skew too great'. `chronyc tracking` on app-17 shows it is 7m20s ahead of its NTP source; the KDC and other hosts are within 200 ms. The realm uses MIT Kerberos defaults. The team wants to restore service without weakening replay protection. What is the most likely cause and correct first action?
MCQ-10A web app on WEB01 runs as the service account svc-web, authenticates users with Kerberos, and then connects to SQL Server on SQL01 as the user. The directory team sets svc-web's msDS-AllowedToDelegateTo to MSSQLSvc/sql01.corp.local:1433. Delegation works for ordinary users. For members of the Tier 0 Admins group it fails: the app cannot obtain a service ticket to SQL01, and the DC logs a rejected S4U2Proxy request. Tier 0 Admins accounts are marked "Account is sensitive and cannot be delegated." What is the cause?
MCQ-12A domain has two AD sites joined by a site link left at the default 180-minute replication interval. At 09:00:00 an administrator on DC-A1 in Site A disables a terminated contractor's account. At 09:04 the contractor signs in with their username and password against DC-B1 in Site B. What is the outcome?
MCQ-24A security group is a member of several other groups and is referenced by ACEs on file shares across the domain. It is deleted, then restored from the Recycle Bin ten days later; the Recycle Bin was enabled before the deletion. Compared with reanimating a tombstone in a domain without the Recycle Bin, what does this restore recover?
MCQ-23A single-domain forest runs two writable domain controllers, DC1 and DC2, with the default 180-day tombstone lifetime. DC1 is a virtual machine on a hypervisor that exposes no VM-GenerationID to the guest. On Monday at 09:00 the platform team reverts DC1 to a snapshot taken 12 days earlier and powers it on. DC2 was never touched. At the snapshot, DC1 had originated updates up to USN 4,750,000; by the time of the revert it had reached 4,900,000, and DC2's up-to-dateness vector for DC1 records 4,900,000. At 09:30 an admin creates a user account on DC1. Two days later that account still does not exist on DC2, while accounts created on DC2 after the revert are present on both controllers. What happened to the account?
MCQ-22A ransomware crew compromised every domain controller in a three-domain forest. The team has clean system-state backups taken six days before the intrusion, one per domain. They restore the forest-root DC from its backup and connect it to the production network while a compromised DC in a child domain is still running. Within minutes the restored DC shows the attacker's new Enterprise Admins member. What caused this?
MCQ-13At 09:00 a helpdesk disables a departing employee's on-prem AD account. The employee signed in at 08:00 and holds a Kerberos TGT (domain default 10-hour lifetime), a VPN session with an 8-hour idle timeout, and a session cookie for an internal web app that validates the cookie locally. What is true at 09:01?
MCQ-19A 40-worker batch service used a static service-account password, read from a mounted file at start. The team replaces it with workload identity: at startup each worker calls the platform's token endpoint and gets a token that lasts 15 minutes, and the worker passes that token string to its database client. The platform caps token lifetime at 15 minutes and the cap cannot be changed. Workers run for hours of short bursts with idle gaps between them; the database closes any connection idle for 5 minutes, and each worker opens a fresh connection at the start of every burst. After the migration, all bursts a worker opens within its first 15 minutes succeed, while every burst that opens a connection more than 15 minutes after that worker started fails with an authentication error. The token endpoint is healthy and logs exactly one issuance per worker. Which change fixes the failures?
MCQ-21An incident review found that a red-team operator with a compromised helpdesk account took three steps over 11 days: (1) added a service account to the Account Operators group, (2) used that membership to write an ACE on the domain object granting the service account Replicating Directory Changes All, and (3) ran DCSync from the service account. The SOC's directory pipeline collects 4624, 4720, 4728, 4732 and 4768 from every domain controller. It alerted on step 1 and produced nothing for steps 2 and 3. Directory Service Changes auditing is enabled on all domain controllers. Which single change to the pipeline would have alerted on step 2?