On Wed, 2021-09-22 at 15:26 +0200, Jacques Beigbeder wrote:> You are kind to investigate! > > > > Yes, nothing in Samba should have segmentation faults, > > We had SEGV 20 years ago! Today, we should have error messages. > No more. > I have Ubuntu 20.04 up-to-date that is: > ii samba 2:4.11.6+dfsg-0ubuntu1.10 amd64 SMB/CIFS file, > print, and login server for Unix > > > > > ... but I would > > > still like to know just what the OP is trying to do, there may be > > > a > > > better way of doing it. > > I have 30 years of Unixes, Solaris, FreeBSD, now Linux and Ubuntu. > samba and Windows are not my speciality. So a better way? May be...Are you attempting to upgrade a Samba NT4-style domain (PDC) to a Samba AD domain ?, if so, are you aware of the classicupgrade option for 'samba-tool domain' ? This takes your old domain and upgrades it to an AD domain.> > I had an old Samba 3 installation with /etc/samba/smbpasswd > and Windows 7. > > I want to migrate to Samba 4 + Windows 10. > I known how to do with 20 users: Windows 10 authenticate > with Samba4, Windows connect drives on D: or E:. > > I fail to migrate not 20 but 3300 entries from > the old /etc/samba/smbpasswd. > My idea was: > 3300 times samba-tool user create ... > but it fails to restore passwords... for the last 800 users.I do not think your method is going to work, the 'passwords' that pdbedit is producing are hashes of password and 'samba-tool user create' requires the plain password, it also doesn't help that AD uses a different hash. Rowland
On Wed, 2021-09-22 at 16:04 +0100, Rowland Penny via samba wrote:> On Wed, 2021-09-22 at 15:26 +0200, Jacques Beigbeder wrote: > > > > I had an old Samba 3 installation with /etc/samba/smbpasswd > > and Windows 7. > > > > I want to migrate to Samba 4 + Windows 10. > > I known how to do with 20 users: Windows 10 authenticate > > with Samba4, Windows connect drives on D: or E:. > > > > I fail to migrate not 20 but 3300 entries from > > the old /etc/samba/smbpasswd. > > My idea was: > > 3300 times samba-tool user create ... > > but it fails to restore passwords... for the last 800 users. > > I do not think your method is going to work, the 'passwords' that > pdbedit is producing are hashes of password and 'samba-tool user > create' requires the plain password, it also doesn't help that AD > uses > a different hash.We use the same hash (this is how upgrades have always worked) for arcfour-hmac-md5. I think I understand the OP is trying to import users into Samba AD that are currently in smbpasswd format, obtained from somewhere (doesn?t really matter), and the plumbing of sam.ldb into a passdb module was specifically built to make things like this possible (and additionally the classicupgrade code path which wraps up many of the steps). Most folks who do this kind of thing often directly import LDIF with the magic controls for this however. However without a backtrace we can't do very much, but running under valgrind might be illuminating. Andrew Bartlett -- Andrew Bartlett (he/him) https://samba.org/~abartlet/ Samba Team Member (since 2001) https://samba.org Samba Team Lead, Catalyst IT https://catalyst.net.nz/services/samba Samba Development and Support, Catalyst IT - Expert Open Source Solutions