Tools

How to Configure the Serv-U LDAP Search Filter for Active Directory

This article explains how the LDAP Search Filter in Serv-U works with Active Directory and the difference between using the `userPrincipalName` and `sAMAccountName` attributes for user authentication.

First published date

9/15/2026 3:36 PM

Last published date

9/15/2026 3:36 PM

Overview

Serv-U can authenticate users against Active Directory using LDAP. The LDAP Search Filter determines how Serv-U searches for a user account based on the login ID provided by the user.

 

The default Search Filter uses the `userPrincipalName` attribute:

 

(&(objectclass=user)(userPrincipalName=$LoginID))

 

If users log in using their Active Directory username instead of their User Principal Name (UPN), the `sAMAccountName` attribute can be used:

 

(&(objectclass=user)(sAMAccountName=$LoginID))

 

This article explains the difference between `userPrincipalName` and `sAMAccountName` and how to select the appropriate Search Filter based on the user's login format.

Product section

Serv-U Managed File Transfer & Serv-U FTP Server

Cause

N/A

Resolution

Procedure

  • Open the Serv-U Management Console.
  • Go to Users > LDAP Authentication.
  • Select the LDAP Server, click Edit, and then click Show Advanced LDAP Options.
  • Locate the Search Filter field. By default, it is set to:
(&(objectclass=user)(userPrincipalName=$LoginID))
  1. The userPrincipalName attribute is used when users log in using their User Principal Name (UPN), for example:

user@domain.com
  1. If users log in using their Active Directory username (sAMAccountName), change the Search Filter to:

(&(objectclass=user)(sAMAccountName=$LoginID))
  1. Save the changes.

  2. Test the configuration by logging in with an Active Directory account.

Example

An Active Directory account may have the following values:

sAMAccountName: jsmith
userPrincipalName: jsmith@domain.com

If the user logs in as:

jsmith

use:

(&(objectclass=user)(sAMAccountName=$LoginID))

If the user logs in as:

jsmith@domain.com

use:

(&(objectclass=user)(userPrincipalName=$LoginID))

Note: $LoginID represents the login ID entered by the user. The attribute used in the Search Filter must match the format of the login ID.