|
| 1 | +.. _ug-user_management-ldap-389_ds-cheat_sheet: |
| 2 | + |
| 3 | +The following provides base information for working with SIMP-managed |
| 4 | +:term:`389-DS` systems. |
| 5 | + |
| 6 | +For more information about getting started with 389-DS, see the |
| 7 | +`389-DS Quickstart`_ |
| 8 | + |
| 9 | +File Locations |
| 10 | +============== |
| 11 | + |
| 12 | +* ``/etc/dirsrv`` |
| 13 | + |
| 14 | + * The default location for directory services |
| 15 | + |
| 16 | +* ``/usr/share/puppet_ds389_config`` |
| 17 | + |
| 18 | + * Information used to bootstrap the 389-DS instances. May, or may not, be |
| 19 | + relevant once the system is fully operational. |
| 20 | + |
| 21 | +ds* Commands |
| 22 | +============ |
| 23 | + |
| 24 | +389-DS uses a collection of commands for managing instances. |
| 25 | + |
| 26 | +Some of the more useful are listed below. |
| 27 | + |
| 28 | +.. NOTE:: |
| 29 | + |
| 30 | + It is important to know that the SIMP-managed 389-DS instances use an |
| 31 | + account-to-DN mapping for the ``root`` user that automatically maps ``root`` |
| 32 | + to the administrative DN for the instance if you are using LDAPI. |
| 33 | + |
| 34 | + This makes the administration process much easier for daily activities and is |
| 35 | + recommended unless you need to manage the system remotely. |
| 36 | + |
| 37 | +dsctl - Directory Server Control |
| 38 | +-------------------------------- |
| 39 | + |
| 40 | +* ``dsctl -l`` |
| 41 | + |
| 42 | + * List all instances on the system (ignore the ``slapd-`` prefix when |
| 43 | + referencing them in other commands). |
| 44 | + |
| 45 | +* ``dsctl [instance_name] <start|stop|restart|status>`` |
| 46 | + |
| 47 | + * The easiest manner to manage the running state of your instances. |
| 48 | + |
| 49 | +* ``dsctl [instance_name] healthcheck`` |
| 50 | + |
| 51 | + * Check the instance for common issues |
| 52 | + |
| 53 | +dsconf - Directory Server Configuration |
| 54 | +--------------------------------------- |
| 55 | + |
| 56 | +* ``dsconf [instance_name] config get`` |
| 57 | + |
| 58 | + * Print the main configuration of the specified instance. |
| 59 | + |
| 60 | +* ``dsconf [instance_name] security get`` |
| 61 | + |
| 62 | + * Print the security configuration of the specified instance. |
| 63 | + |
| 64 | +* ``dsconf [instance_name] pwpolicy get`` |
| 65 | + |
| 66 | + * Print the **global** password policy for the instance. |
| 67 | + |
| 68 | +* ``dsconf [instance_name] localpwp list`` |
| 69 | + |
| 70 | + * Print all known local password policies in the instance. |
| 71 | + |
| 72 | +* ``dsconf [instance_name] localpwp get [DN]`` |
| 73 | + |
| 74 | + * Print the details of the local password policy specified by ``[DN]`` (This |
| 75 | + is one of the items output by ``localpwp list``). |
| 76 | + * Note that local password policies are overrides to individual global |
| 77 | + password policy entries. |
| 78 | + |
| 79 | +dsidm - Directory Server Identity Management |
| 80 | +-------------------------------------------- |
| 81 | + |
| 82 | +The ``dsidm`` command provides account management capabilities and the usage is |
| 83 | +covered in detail in the account management sections. |
| 84 | + |
| 85 | +To make using ``dsidm`` easier, you may want to add something like the following |
| 86 | +to ``~/.dsrc``: |
| 87 | + |
| 88 | +.. code-block:: ini |
| 89 | +
|
| 90 | + [<instance_name>] |
| 91 | + uri = ldapi://%%2fvar%%2frun%%2fslapd-<instance_name>.socket |
| 92 | + basedn = <base DN> |
| 93 | +
|
| 94 | +For a more concrete example, we will use the ``accounts`` instance provided by |
| 95 | +the ``simp/simp_ds389`` module. |
| 96 | + |
| 97 | +To find your base DN, you can run the following: |
| 98 | + |
| 99 | +.. code-block:: shell |
| 100 | +
|
| 101 | + dsidm accounts account list | head -1 |
| 102 | +
|
| 103 | +Assuming that our base DN is ``dc=local,dc=com``, our configuration file would |
| 104 | +look like the following: |
| 105 | + |
| 106 | +.. code-block:: ini |
| 107 | +
|
| 108 | + [accounts] |
| 109 | + uri = ldapi://%%2fvar%%2frun%%2fslapd-accounts.socket |
| 110 | + basedn = dc=local,dc=com |
| 111 | +
|
| 112 | +.. _389-DS Quickstart: https://directory.fedoraproject.org/docs/389ds/howto/quickstart.html |
0 commit comments