[Systems] LDAP Failure [fixed]
James Cameron
quozl at laptop.org
Fri Jan 24 21:06:55 EST 2025
After upgrade from Ubuntu 20.04 to Ubuntu 22.04 several services
had failed.
What I've just done;
1. got mailing lists working by installing
python-dnspython_1.16.0-1build1_all.deb from Ubuntu 20.04, and editing
the /usr/lib/mailman/bin/postfix-to-mailman.py script to reference
/usr/bin/python2 rather than /usr/bin/python
2. got slapd working by restoring from
/var/backups/slapd-2.4.49+dfsg-2ubuntu1.10 with edits until slapadd
returned zero, and confirmed directory ownership had returned,
3. restarted postfix, and confirmed mail aliases were working,
The edits to the LDAP database follow;
--- cn=config.ldif-20250125-quozl.orig 2025-01-24 20:40:02.152473644 -0500
+++ cn=config.ldif-20250125-quozl 2025-01-24 20:49:38.736612003 -0500
@@ -17,7 +17,7 @@
objectClass: olcModuleList
cn: module{0}
olcModulePath: /usr/lib/ldap
-olcModuleLoad: {0}back_hdb
+olcModuleLoad: {0}back_mdb
structuralObjectClass: olcModuleList
entryUUID: 3f3d35fa-63b8-102d-9c86-b735f80fdbcb
creatorsName: cn=config
@@ -635,7 +635,6 @@
dn: olcDatabase={-1}frontend,cn=config
objectClass: olcDatabaseConfig
objectClass: olcFrontendConfig
-olcAllows: update_anon
olcDatabase: {-1}frontend
olcAccess: {0}to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=extern
al,cn=auth manage by * break
@@ -681,18 +680,14 @@
modifiersName: cn=config
modifyTimestamp: 20081221143441Z
-dn: olcDatabase={1}hdb,cn=config
+dn: olcDatabase={1}mdb,cn=config
objectClass: olcDatabaseConfig
-objectClass: olcHdbConfig
-olcDatabase: {1}hdb
+objectClass: olcMdbConfig
+olcDatabase: {1}mdb
olcDbDirectory: /var/lib/ldap
olcSuffix: dc=sugarlabs,dc=org
olcLastMod: TRUE
olcDbCheckpoint: 512 30
-olcDbConfig: {0}set_cachesize 0 2097152 0
-olcDbConfig: {1}set_lk_max_objects 1500
-olcDbConfig: {2}set_lk_max_locks 1500
-olcDbConfig: {3}set_lk_max_lockers 1500
olcDbIndex: default sub
olcDbIndex: objectClass pres,eq
olcDbIndex: cn pres,eq,sub
@@ -709,7 +704,7 @@
olcDbIndex: nisMapEntry pres,eq,sub
olcDbIndex: displayName pres,eq,sub
olcDbIndex: uniqueMember eq
-structuralObjectClass: olcHdbConfig
+structuralObjectClass: olcMdbConfig
entryUUID: 3f3e0cc8-63b8-102d-9c8e-b735f80fdbcb
creatorsName: cn=admin,cn=config
createTimestamp: 20081221143441Z
The instructions followed were;
https://git.launchpad.net/ubuntu/+source/openldap/tree/debian/slapd.README.Debian?h=ubuntu/impish-devel
On Thu, Jan 23, 2025 at 02:44:08PM +0100, Chihurumnaya Ibiam wrote:
> I ran an update for sunjammer last night and slapd fails to start, so LDAP
> isn't working like it should.
>
> Following [1]these instructions, I backed up the old config and then tried to
> load it into the new database - I didn't change the config as we didn't have
> the fields needed to change -.
>
> I did that using;
>
> $ slapadd -F /etc/ldap/slapd.d -l /var/backups/slapd-2.4.49+dfsg-2ubuntu1.9/
> slapd.d/cn\=config.ldif -n 0
> Closing DB...
>
> This was after emptying /etc/ldap/slapd.d.
>
> Then I ran;
> $ slapadd -l /var/backups/slapd-2.4.49+dfsg-2ubuntu1.9/slapd.d/cn\=config.ldif
> Available database(s) do not allow slapadd
>
> The database doesn't get added and they're no ldap entries.
>
> --
>
> Ibiam Chihurumnaya
> [2]ibiamchihurumnaya at gmail.com
>
> References:
>
> [1] https://sources.debian.org/src/openldap/2.5.13%2Bdfsg-5/debian/slapd.README.Debian/#L329
> [2] mailto:ibiamchihurumnaya at gmail.com
> _______________________________________________
> Systems mailing list
> Systems at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/systems
More information about the Systems
mailing list