Skip to main content

LDAP

Sign in with your LDAP or Active Directory username and password.

Access & SecuritySourceAPIChangelog
  • Sign in against LDAP or Active Directory
  • More than one directory, each with its own login button
  • LDAPS for encrypted connections
  • Make members of an admin group Termix admins

LDAP lets people sign in to Termix with their LDAP or Active Directory username and password. Termix checks the password against your directory. Nobody needs a separate Termix password.

You can add more than one directory. Each gets its own button on the sign in page.

Add a directory​

  1. Install the plugin from the Plugins tab.
  2. Open Settings, LDAP and press Add Directory.
  3. Fill in the fields below, turn on Enabled and press Save Directory.

The sign in page now shows a button for the directory. Pressing it asks for an LDAP username and password.

Fields​

FieldWhat it is
Display NameThe button label, like Company directory.
LDAP Host, PortYour server. Usually port 389, or 636 for LDAPS.
Use TLS (LDAPS)Connect over LDAPS. Use it unless the directory is on the same trusted network.
CA certificateThe PEM certificate that signed your directory's certificate, if it isn't from a public CA.
Skip certificate checkAccept any certificate. Only for a test directory.
Bind DN, Bind PasswordThe account Termix signs in as to look users up.
User Search BaseWhere users live, like ou=users,dc=example,dc=com.
User Search FilterHow to find a user. {{username}} is replaced with what they typed, like (uid={{username}}), or (sAMAccountName={{username}}) for Active Directory.
Username AttributeThe attribute with the username. It becomes the Termix username. Usually uid, or sAMAccountName in Active Directory.
Group Search BaseWhere groups live, for the admin check and group roles.
Admin GroupMembers of this group are Termix admins. Its cn or full DN; case and spaces in a DN don't matter.
Allowed UsersA comma separated list of usernames allowed to sign in. Empty allows anyone the directory accepts.
Default rolesTermix roles every user from this directory gets when they sign in, separated by commas.
Group rolesOne group:role per line, the group as its cn or full DN.

How sign in works​

  1. Termix binds with the bind DN and searches for the user with your filter.
  2. It checks their password by binding as them.
  3. It finds or makes their Termix account.

If Auto-create external accounts is off in Settings, General, only people who already have an account can sign in this way. An admin can link an LDAP account to an existing local one in Settings, Users.

If you set Group Search Base and Admin Group, admin rights follow the group on every sign in. Add someone to the group and they are an admin next time they sign in. Remove them and they lose it.

Group roles work the same way for custom roles: a user gets each mapped role while they are in its group, from their first sign in on, so new people can reach shared hosts right away. Default roles are given on every sign in and never taken away. Create the roles in Settings, Roles first; a role name that does not exist is skipped.

With other sign in options​

LDAP works next to passwords, Single sign-on, TOTP and Passkeys. To ask for a second factor after an LDAP sign in too, turn on Ask for a second factor after external logins in Settings, General.

Use $external.username as a host's username to fill in the name someone signed in with.

Troubleshooting​

  • Invalid credentials for everyone: Check the bind DN and password first, then the search base and filter. The server log shows why a sign in was refused.
  • Refused even with the right password: The filter has to match exactly one entry. If it matches several, Termix refuses the sign in rather than guess, so make the filter stricter.
  • Certificate errors with LDAPS: Paste your CA under CA certificate.
  • Too many attempts: Sign ins are rate limited per user to stop guessing. Wait a few minutes.

Who can add and change directories is set by ldap.manage. Only admins have it at first.