LDAP

2026-01-01 06:54:18
Sanplex Content
25
Last edited by WANG JING on 2026-01-01 07:13:40
Share links
Summary : Sanplex LDAP integrates directory authentication for automatic login and user import. After enabling the PHP LDAP extension, admins configure LDAP/AD, then search, import, and map directory users to local accounts.

Sanplex LDAP relies on the PHP LDAP extension, so the LDAP extension must be enabled/loaded. For reference (replace with a Sanplex help link when available): (再此插入 安装PHP的LDAP扩展链接)


By configuring LDAP, Sanplex supports automatic authentication against an LDAP server. Sanplex also supports importing users from LDAP, addressing user import and single sign-on needs in Windows domains (Windows AD).

I. LDAP Server Configuration

Configure LDAP in Admin > System Settings > LDAP. Video reference (replace with a Sanplex video link when available):
(在此插入配置视频)

图1

If the configuration is correct, users can log in with their LDAP username and password. Sanplex will authenticate automatically and add the user to the database.

If Anonymous is enabled, the admin account and password fields will be hidden and do not need to be filled in.

图2

Notes:

  • Base DN should be filled in as shown below.

    图3

  • Login Name should be set to the username attribute used by the LDAP server, as shown below.

    图4

II. Active Directory Configuration

Set the server type to Active Directory. Since Active Directory does not allow anonymous login, you must enter the admin account and password.

图5

Note: The admin account must have sufficient privileges for the domain; otherwise, queries may fail.

图6

Fill in the admin account as shown. Ensure access is allowed in the Active Directory configuration; otherwise, users will not be able to log in.

图7

III. Import Users

After the LDAP configuration is successful, click Import Users from LDAP to import users.

When associating local accounts, select a local account to bind the LDAP user to that account. You can use search filters and duplicate-name handling rules to distinguish users with the same real name.

1. Search

In Admin > User Management > Users, click Import Users from LDAP to enter the import page, where you can see the search button.

图8

Click Search to find users you want to import.

图9

Search conditions can include the attributes configured during LDAP setup, such as Login Name, Real Name, Mobile, Work Phone, and Email. In addition, Sanplex provides a custom attribute search.

LDAP servers may contain additional attributes beyond the defaults. You can search these via the custom field by entering the attribute name and value using LDAP filter syntax.

Examples (based on the screenshots above):

  • To search for users where attribute sn is not equal to wang, enter: !(sn=wang)
  • To search for users where attribute sn equals wang, enter: sn=wang

You can search other attributes in the same way.

2. Duplicate-Name Check and Display Options

When importing users from LDAP, if an LDAP user’s Real Name duplicates an existing Sanplex user’s real name, you can configure how to distinguish them in LDAP settings:

  • Append a number after the real name, e.g., “Jhon”, “Jhon2”.
  • Append the department after the real name, e.g., “Jhon (R&D)”, “Jhon(Test)”.

The default behavior is to append a number.

图10

If you choose to append the department, you must select the target department during import. If no department is selected, it will display as “Jhon (0)”.

图11

Below are examples of how imported users are displayed with numbering and with department suffixes.

图12

Write a Comment
Comment will be posted after it is reviewed.