.. include:: /Includes.rst.txt .. _handbook-administration-package-directory: .. _handbook-administration-directory: ===================================== Directory (LDAP and Active Directory) ===================================== .. note:: This page needs the Directory package. If your company does not use it, the directory cannot be chosen. Connect adsum to your Active Directory or another LDAP directory. People then log in with their directory password, adsum keeps the accounts in step with the directory, and groups can give the roles HR and admin. Connect the directory ===================== #. Open :guilabel:`Administration > Single sign-on` and select :guilabel:`Add a provider`. #. As :guilabel:`Type`, choose :guilabel:`Directory (LDAP, Active Directory)`. Enter a :guilabel:`Label` and switch on :guilabel:`Active`. #. Under :guilabel:`Directory connection`, enter the :guilabel:`Servers`, such as ``ldaps://dc1.example.local``, choose the kind of :guilabel:`Directory`, and enter the service account adsum reads the directory with. #. Under :guilabel:`Entries`, enter the :guilabel:`Search base (base DN)`, the :guilabel:`Filter` for the people and the :guilabel:`Login name` people log in with. #. Under :guilabel:`Attributes`, name the directory attributes for name, e-mail, phone, department and so on. Leave one empty to ignore it. #. Save, then select :guilabel:`Test`. Nothing is changed by the test. Selecting the directory in the list opens its own page with the tabs :guilabel:`Settings`, :guilabel:`Sync runs` and :guilabel:`Open write-backs`. Sync ==== The sync links each directory entry to the employee with the same e-mail address. When an entry is disabled or removed in the directory, the person's account is blocked; when it is enabled again, the block is lifted. HR sees entries that match no employee (see :ref:`handbook-hr-directory-entries`). Under :guilabel:`Sync`, choose how often it runs, whether it takes names and phone from the directory, and whether changes in adsum are written back to the directory. :guilabel:`Sync now` starts it at once; :guilabel:`Dry run` only shows what it would do. The tab :guilabel:`Sync runs` lists every run. If a sync would block more than a fifth of the accounts, it stops with :guilabel:`Stopped before blocking` and the administrators are notified. Check the filter and search base. If the blocks are right, start the sync again with :guilabel:`Allow blocking more than a fifth of the accounts`. Roles from groups ================= Under :guilabel:`Roles from groups`, switch the mapping on and enter the directory groups for HR and for admins, one per line. At every login and sync, people get or lose the roles according to their groups. The last HR person or administrator of the company always keeps the role. Good to know ============ - People change their password in the directory, not in adsum. A password they had in adsum before no longer works. - When the directory cannot be reached, nobody can log in with it. - The tab :guilabel:`Open write-backs` shows changes the directory has not accepted yet.