Migrate to bookworm could not be completed (nsswitch & ldap)

What type of hardware are you using: Raspberry Pi 3, 4+
What YunoHost version are you running: 11.3.0.2
How are you able to access your server: SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: No

Describe your issue

This morning, I tried to migrate my yunohost server from 11.3.0.2 to ynh 12.
At the end of the script, I’ve got the following errors :
Info: [###################.] > 99.8% Processing php7.3-cli
Info: [###################.] > 99.9% Processing php7.4-fpm
Info: [####################] > 100.0% Done
Info: The operation ‘Regenerate system configurations ‘nsswitch’’ could not be completed. Please share the full log of this operation using the command ‘yunohost log share 20241211-103604-regen_conf-nsswitch’ to get help
Error: Migration 0027_migrate_to_bookworm did not complete, aborting. Error: ldap 3.4.3 and _ldap 3.2.0 version mismatch!
Info: The operation ‘Run migrations’ could not be completed. Please share the full log of this operation using the command ‘yunohost log share 20241211-092802-tools_migrations_migrate_forward’ to get help

Share relevant logs or error messages

https://paste.yunohost.org/raw/uwunofehid

https://paste.yunohost.org/raw/wocijuwuzi

AssertionError: ldap 3.4.3 and _ldap 3.2.0 version mismatch!

eh okay, let’s have a look at dpkg --list | grep ldap

Hello Aleks, thanks for your reply

root@dyndockstar:/home/admin# dpkg --list | grep ldap
ii dovecot-ldap 1:2.3.19.1+dfsg1-2+b1 armhf secure POP3/IMAP server - LDAP support
ii ldap-utils 2.5.13+dfsg-5+rpi1 armhf OpenLDAP utilities
ii libdbd-ldap-perl 0.20-1.1 all Perl extension for LDAP access via an SQL/Perl DBI interface
ii libldap-2.4-2:armhf 2.4.57+dfsg-3+deb11u1 armhf OpenLDAP libraries
ii libldap-2.5-0:armhf 2.5.13+dfsg-5+rpi1 armhf OpenLDAP libraries
ii libldap-common 2.5.13+dfsg-5+rpi1 all OpenLDAP common files for libraries
ii libnet-ldap-perl 1:0.6800+dfsg-1 all client interface to LDAP servers
ii libnss-ldapd:armhf 0.9.12-4 armhf NSS module for using LDAP as a naming service
ii libpam-ldapd:armhf 0.9.12-4 armhf PAM module for using LDAP as an authentication service
ii lua-ldap:armhf 1.3.0-2+b1 armhf LDAP library for the Lua language
rc php7.3-ldap 7.3.33-7+0~20220929.100+debian11~1.gbpdb2e49 armhf LDAP module for PHP
ii php7.4-ldap 1:7.4.33-16+0~20241124.96+debian12~1.gbp29586d armhf LDAP module for PHP
ii postfix-ldap 3.7.11-0+deb12u1 armhf LDAP map support for Postfix
ii python3-ldap 3.4.3-2+b1 armhf LDAP interface module for Python3
ii sudo-ldap 1.9.13p3-1+deb12u1 armhf Provide limited super user privileges (with LDAP support)

Hmmm I wonder if it could just be a glitch because of the fact that the ldap lib was updated and there was a mismatch between what was already in RAM from the previous system and the new version on disk … not sure why nobody else had this issue though

What happens if you try to manually run yunohost tools regen-conf from the command line ?

Hi Aleks,

Sorry for my reply delay.
My Raspberry died during the wednesday to thursday night…
Actually, the hardware didn’t burn. But I can’t access to the raspberry (not by SSH, nor ping).
I physically restart it and after the situation became better. Now I can access to the Raspberry and my NFS share is up.
Nevertheless I think my yunohost system is broken because I can’t make “sudo su” command. Each time I try this, the system tells me “admin” isn’t in sudoers :cry:

This is not a very big problem. Lasts months I mainly use my raspberry pi to share an USB disk using NFS, I think I will reinstall it in a few time and before this I can access to my data.

Have a good day.
Best regard

That’s probably because of the nsswitch conf, yes

If you have root’s password (should be the first password you chose during the initial setup), are you able to become root using just su ?

Effectively, su command works :grinning:

I was trying to run regen-conf command and I get this output
admin@dyndockstar:~ $ su
Password:
root@dyndockstar:/home/admin# yunohost tools regen-conf
Warning: The configuration file ‘/etc/systemd/system/ntp.service.d/ynh-override.conf’ has been manually modified and will not be updated
Warning: The configuration file ‘/etc/ldap/slapd.ldif’ has been manually modified and will not be updated
Success! Configuration updated for ‘apt’
Success! Configuration updated for ‘dnsmasq’
Warning: The configuration file ‘/etc/nsswitch.conf’ has been manually modified and will not be updated
apt:
applied:
/etc/apt/sources.list.d/extra_php_version.list:
status: managed
pending:
dnsmasq:
applied:
/etc/resolv.dnsmasq.conf:
status: updated
pending:
nsswitch:
applied:
pending:
/etc/nsswitch.conf:
status: modified
slapd:
applied:
pending:
/etc/ldap/slapd.ldif:
status: modified
yunohost:
applied:
pending:
/etc/systemd/system/ntp.service.d/ynh-override.conf:
status: modified

For information, here is my nsswitch.conf

root@dyndockstar:/home/admin# cat /etc/nsswitch.conf

/etc/nsswitch.conf

passwd: files systemd ldap
group: files systemd ldap
shadow: files ldap
gshadow: files

hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis

Unfortunatly, after regen-conf (and a reboot too), I think my Raspberry is always unstable because “sudo su” always failed…

Thank’s a lot for your help

Warning: The configuration file ‘/etc/nsswitch.conf’ has been manually modified and will not be updated

Ah yes sorry that should be : yunohost tools regen-conf nsswitch --force

(and actually you probably want yunohost tools regen-conf --force to force-regen everything because i doubt you really manually modified slapd.ldif and ntp.service.d/ynh-override.conf)

Hi Aleks,

Thank’s for your help, I run yunohost tools regen-conf --force and all is Ok on my yunohost installation.

Thank a lot for your help.
Have a good day

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.