Problem: slapd package corruption

Hi,
i use the solution
but no work for me
when I do:

dpkg --configure --pending

i have this message:

Paramétrage de slapd (2.4.47+dfsg-3+deb10u7A~5.0.1.202205211909) ...
Multifile: /etc/ldap/slapd.conf
File: /etc/init.d/slapd
  Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.4.47+dfsg-3+deb10u6A~5.0.0.202201251313... done.
[....] Stopping slapd (via systemctl): slapd.serviceWarning: The unit file, source configuration file or drop-ins of slapd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
. ok 
Job for slapd.service failed because the control process exited with error code.
See "systemctl status slapd.service" and "journalctl -xe" for details.
dpkg: erreur de traitement du paquet slapd (--configure) :
 installed slapd package post-installation script subprocess returned error exit status 1
Traitement des actions différées (« triggers ») pour libc-bin (2.28-10) ...
Des erreurs ont été rencontrées pendant l'exécution :
 slapd

I have a tabl version problem :disappointed:

apt-cache policy univention-ldap-server
univention-ldap-server:
  Installé : 16.0.7-18A~5.0.0.202203181059
  Candidat : 16.0.7-18A~5.0.0.202203181059
 Table de version :
 *** 16.0.7-18A~5.0.0.202203181059 500
        500 https://updates.software-univention.de errata501/main amd64 Packages
        100 /var/lib/dpkg/status
     **16.0.7-8A~5.0.0.202112071104 500**
        500 https://updates.software-univention.de ucs501/main amd64 Packages

apt-cache policy slapd
slapd:
  Installé : 2.4.47+dfsg-3+deb10u7A~5.0.1.202205211909
  Candidat : 2.4.47+dfsg-3+deb10u7A~5.0.1.202205211909
 Table de version :
 *** 2.4.47+dfsg-3+deb10u7A~5.0.1.202205211909 500
        500 https://updates.software-univention.de errata501/main amd64 Packages
        100 /var/lib/dpkg/status
     **2.4.47+dfsg-3+deb10u6A~5.0.0.202108021020 500**
        500 https://updates.software-univention.de ucs501/main amd64 Packages

I don’t know how to fix, to restart the slapd service I have to replace the slapd.conf file with slapd.conf.last

Hi,

I am unsure about your issue. Can you start the LDAP-daemon manually? systemctl start slapd?
Does this work?

If not, try to configure your system until you have a running slapd. Then the apt command should work again.

/KNEBB

if i start manually without change slapd.conf, i have this message:

systemctl start slapd
Job for slapd.service failed because the control process exited with error code.
See "systemctl status slapd.service" and "journalctl -xe" for details.

systemctl status slapd.service
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
   Loaded: loaded (/etc/init.d/slapd; generated)
   Active: failed (Result: exit-code) since Fri 2022-06-17 18:54:37 CEST; 1min 15s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3629 ExecStart=/etc/init.d/slapd start (code=exited, status=1/FAILURE)

juin 17 18:54:37 ucs slapd[3641]: DIGEST-MD5 common mech free
juin 17 18:54:37 ucs slapd[3641]: DIGEST-MD5 common mech free
juin 17 18:54:37 ucs slapd[3641]: slapd stopped.
juin 17 18:54:37 ucs slapd[3641]: connections_destroy: nothing to destroy.
juin 17 18:54:37 ucs slapd[3629]: failed.
juin 17 18:54:37 ucs slapschema[3644]: Loaded metadata from "/usr/share/univention-management-console/saml/idp/ucs-sso.ldi.intranet.xml"
juin 17 18:54:37 ucs slapd[3629]: /etc/ldap/slapd.conf: line 143: index attribute "guacamoleActivated1" undefined slapschema: bad configuration file!.
juin 17 18:54:37 ucs systemd[1]: slapd.service: Control process exited, code=exited, status=1/FAILURE
juin 17 18:54:37 ucs systemd[1]: slapd.service: Failed with result 'exit-code'.
juin 17 18:54:37 ucs systemd[1]: Failed to start LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).

journalctl -xe
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) slapd.service a échoué, avec le résultat failed.
juin 17 18:55:01 ucs CRON[3650]: pam_unix(cron:session): session opened for user root by (uid=0)
juin 17 18:55:01 ucs CRON[3648]: pam_unix(cron:session): session opened for user root by (uid=0)
juin 17 18:55:01 ucs CRON[3649]: pam_unix(cron:session): session opened for user root by (uid=0)
juin 17 18:55:01 ucs CRON[3657]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
juin 17 18:55:01 ucs CRON[3659]: (root) CMD (if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ] && [ -d "$(grep '^[[:space:]]*[^#]*[[:space:]]*WorkDir' /etc/mrtg.cfg | awk '{ print $NF }')" 
juin 17 18:55:01 ucs CRON[3649]: pam_unix(cron:session): session closed for user root
juin 17 18:55:01 ucs CRON[3660]: (root) CMD (/usr/sbin/jitter 60 /usr/share/univention-samba4/scripts/sysvol-sync.sh >>/var/log/univention/sysvol-sync.log 2>&1)
juin 17 18:55:01 ucs CRON[3648]: pam_unix(cron:session): session closed for user root
juin 17 18:55:53 ucs CRON[2947]: pam_unix(cron:session): session closed for user root
juin 17 18:55:53 ucs postfix/pickup[2861]: 3A547708600B: uid=0 from=<root>
juin 17 18:55:53 ucs postfix/trivial-rewrite[3671]: error: dict_ldap_connect: Unable to set STARTTLS: -1: Can't contact LDAP server
juin 17 18:55:53 ucs postfix/trivial-rewrite[3671]: warning: ldap:/etc/postfix/ldap.transport lookup error for "*"
juin 17 18:55:53 ucs postfix/trivial-rewrite[3671]: error: dict_ldap_connect: Unable to set STARTTLS: -1: Can't contact LDAP server
juin 17 18:55:53 ucs postfix/cleanup[3670]: error: dict_ldap_connect: Unable to set STARTTLS: -1: Can't contact LDAP server

Ok, looks like you have a schema issue.

/etc/ldap/slapd.conf: line 143:

Try to comment the faulty line in slapd.conf* and get slapd to start. Once started, install Guacamole again.

/KNEBB

I followed your instructions, but I still have the same problem

I doubt you still have exact the same error message when trying to start!

there is no error when I install GUACAMOLE but when I want to fix the problem of corrupted packages I have that

dpkg --configure -a
Paramétrage de slapd (2.4.47+dfsg-3+deb10u7A~5.0.1.202205211909) ...
File: /etc/init.d/slapd
Multifile: /etc/ldap/slapd.conf
  Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.4.47+dfsg-3+deb10u6A~5.0.0.202201251313... done.
[....] Stopping slapd (via systemctl): slapd.serviceWarning: The unit file, source configuration file or drop-ins of slapd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
. ok 
Job for slapd.service failed because the control process exited with error code.
See "systemctl status slapd.service" and "journalctl -xe" for details.
dpkg: erreur de traitement du paquet slapd (--configure) :
 installed slapd package post-installation script subprocess returned error exit status 1
Traitement des actions différées (« triggers ») pour libc-bin (2.28-10) ...
Des erreurs ont été rencontrées pendant l'exécution :
 slapd

and for restart sladp i must be change the

slapd.conf