Hi and happy new year everyone i am testing classic upgrade with recent samba versions everything is ok until version 4.19 but for samba version 4.20 (4.20.6+dfsg-1~~mjt+ubt22 amd64) and 4.21, it fails with this message Failed to connect to 'ldap://localhost' with backend 'ldap': operations error at lib/ldb-samba/ldb_ildap.c:923 my smb.conf settings are passdb backend = ldapsam:ldap://localhost ldap ssl = off and ldap admin dn, and ldap * suffix parameters matching slapd db slapd is running and responds to ldapsearch queries i tried to read upgrade_from_samba3 code in /usr/lib/python3/dist-packages/samba/upgrade.py but i did not see change from 4.19. is there any updates on samba-tool connect to slapd from version 4.20? classic upgrade log: Ready to run classic upgrade.... INFO 2025-01-02 16:43:44,634 pid:101882 /usr/lib/python3/dist-packages/samba/netcmd/domain/classicupgrade.py #183: Reading smb.conf INFO 2025-01-02 16:43:44,634 pid:101882 /usr/lib/python3/dist-packages/samba/netcmd/domain/classicupgrade.py #187: Provisioning INFO 2025-01-02 16:43:44,639 pid:101882 /usr/lib/python3/dist-packages/samba/upgrade.py #504: Exporting account policy INFO 2025-01-02 16:43:44,648 pid:101882 /usr/lib/python3/dist-packages/samba/upgrade.py #508: Exporting groups INFO 2025-01-02 16:43:44,649 pid:101882 /usr/lib/python3/dist-packages/samba/upgrade.py #554: Exporting users INFO 2025-01-02 16:43:44,654 pid:101882 /usr/lib/python3/dist-packages/samba/upgrade.py #635: Next rid = 3006 Failed to connect to 'ldap://localhost' with backend 'ldap': operations error at lib/ldb-samba/ldb_ildap.c:923 ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception - ProvisioningError: Could not open ldb connection to ldap://localhost, the error message is: (1, 'operations error at lib/ldb-samba/ldb_ildap.c:923') File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 285, in _run return self.run(*args, **kwargs) File "/usr/lib/python3/dist-packages/samba/netcmd/domain/classicupgrade.py", line 188, in run upgrade_from_samba3(samba3, logger, targetdir, session_info=system_session(), File "/usr/lib/python3/dist-packages/samba/upgrade.py", line 675, in upgrade_from_samba3 raise ProvisioningError("Could not open ldb connection to %s, the error message is: %s" % (url, e)) -- Arnaud FLORENT IRIS Technologies
On Thu, 2 Jan 2025 16:58:09 +0100 Arnaud FLORENT via samba <samba at lists.samba.org> wrote:> Hi and happy new year everyone > > > i am testing classic upgrade with recent samba versions > > everything is ok until version 4.19 > > > but for samba version 4.20 (4.20.6+dfsg-1~~mjt+ubt22 amd64) and 4.21, > it fails with this message > > > Failed to connect to 'ldap://localhost' with backend 'ldap': > operations error at lib/ldb-samba/ldb_ildap.c:923 > > > my smb.conf settings are > > passdb backend = ldapsam:ldap://localhostTry changing that to: passdb backend = ldapsam:ldap://<your computers IP address>> > ldap ssl = off > > and ldap admin dn, and ldap * suffix parameters matching slapd db > > > > slapd is running and responds to ldapsearch queries > > > i tried to read upgrade_from_samba3 code in > /usr/lib/python3/dist-packages/samba/upgrade.py but i did not see > change from 4.19. > > is there any updates on samba-tool connect to slapd from version 4.20?Not that I am aware off, but there was a change in lib/ldb-samba/ldb_ildap.c that appears to be relevant, as in it wasn't there before. Rowland
Hi this error may be caused by this commit https://github.com/samba-team/samba/commit/2435ab1ad7092c004df72c2cb033eb94e5bf8274 Le 02/01/2025 ? 16:58, Arnaud FLORENT via samba a ?crit?:> Hi and happy new year everyone > > > i am testing classic upgrade with recent samba versions > > everything is ok until version 4.19 > > > but for samba version 4.20 (4.20.6+dfsg-1~~mjt+ubt22 amd64) and 4.21, > it fails with this message > > > Failed to connect to 'ldap://localhost' with backend 'ldap': > operations error at lib/ldb-samba/ldb_ildap.c:923 > > > my smb.conf settings are > > passdb backend = ldapsam:ldap://localhost > > ldap ssl = off > > and ldap admin dn, and ldap * suffix parameters matching slapd db > > > > slapd is running and responds to ldapsearch queries > > > i tried to read upgrade_from_samba3 code in > /usr/lib/python3/dist-packages/samba/upgrade.py but i did not see > change from 4.19. > > is there any updates on samba-tool connect to slapd from version 4.20? > > > > classic upgrade log: > > Ready to run classic upgrade.... > ?INFO 2025-01-02 16:43:44,634 pid:101882 > /usr/lib/python3/dist-packages/samba/netcmd/domain/classicupgrade.py > #183: Reading smb.conf > ?INFO 2025-01-02 16:43:44,634 pid:101882 > /usr/lib/python3/dist-packages/samba/netcmd/domain/classicupgrade.py > #187: Provisioning > ?INFO 2025-01-02 16:43:44,639 pid:101882 > /usr/lib/python3/dist-packages/samba/upgrade.py #504: Exporting > account policy > ?INFO 2025-01-02 16:43:44,648 pid:101882 > /usr/lib/python3/dist-packages/samba/upgrade.py #508: Exporting groups > ?INFO 2025-01-02 16:43:44,649 pid:101882 > /usr/lib/python3/dist-packages/samba/upgrade.py #554: Exporting users > ?INFO 2025-01-02 16:43:44,654 pid:101882 > /usr/lib/python3/dist-packages/samba/upgrade.py #635: Next rid = 3006 > ?Failed to connect to 'ldap://localhost' with backend 'ldap': > operations error at lib/ldb-samba/ldb_ildap.c:923 > ?ERROR(<class 'samba.provision.ProvisioningError'>): uncaught > exception - ProvisioningError: Could not open ldb connection to > ldap://localhost, the error message is: (1, 'operations error at > lib/ldb-samba/ldb_ildap.c:923') > ?? File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", > line 285, in _run > ???? return self.run(*args, **kwargs) > ?? File > "/usr/lib/python3/dist-packages/samba/netcmd/domain/classicupgrade.py", > line 188, in run > ???? upgrade_from_samba3(samba3, logger, targetdir, > session_info=system_session(), > ?? File "/usr/lib/python3/dist-packages/samba/upgrade.py", line 675, > in upgrade_from_samba3 > ???? raise ProvisioningError("Could not open ldb connection to %s, the > error message is: %s" % (url, e)) > >-- Arnaud FLORENT IRIS Technologies