Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-56976

slapd fails to start as different user

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • None
    • rhel-9.4
    • openldap
    • None
    • No
    • Low
    • rhel-sst-idm-ds
    • ssg_idm
    • 0
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      Make slapd run as a different user (i.e. not ldap)

      Please provide the package NVR for which bug is seen:

      openldap-servers-2.6.6-3.el9.x86_64

      How reproducible:

      Every time.

      Steps to reproduce

      1. Install openldap-servers
      2. Create /etc/sysconfig/slapd with content of SLAPD_USER=slapd
      3. Attempt to start slapd.

      Expected results

      slapd process to run as the slapd user

      Actual results

      slapd process attempts to start as ldap user still.

      Additional Info

      The systemd service file has hardcoded to start as the ldap user.

      /usr/lib/systemd/system/slapd.service

      ExecStart=/usr/sbin/slapd -u ldap -h "ldap:/// ldaps:/// ldapi:///"

      If I create an override including the EnvironmentFile and replacing the ExecStart like so:

      /etc/systemd/system/slapd.service.d/override.conf
      [Service]
      EnvironmentFile=/etc/sysconfig/slapd
      ExecStart=
      ExecStart=/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u $SLAPD_USER

      The slapd correctly runs as the user slapd.

      (Sorry I missed anything, first time reporting here!).

              idm-ds-dev-bugs IdM DS Dev
              m.v.sangster@abdn.ac.uk Mark Sangster (Inactive)
              IdM DS Dev IdM DS Dev
              IdM DS QE IdM DS QE
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: