sam.ldb on a domain seems corrupted. A fresh domain works fine so samba itself seems fine. Running the command, sudo ldbsearch -H sam.ldb '(objectclass=computer)' dn returns a slew of errors. http://paste.opensuse.org/view/simple/61443635 I need the data out of this as the server it's from is supposed to be production. Is there a way to either repair it or recover any portions of it into a new sam.ldb? I'm open to suggestions. Thanks, Torin Woltjer Grand Dial Communications - A ZK Tech Inc. Company 616.776.1066 ext. 2006 www.granddial.com
On Tue, 25 Sep 2018 15:38:35 GMT Torin Woltjer via samba <samba at lists.samba.org> wrote:> sam.ldb on a domain seems corrupted. A fresh domain works fine so > samba itself seems fine. Running the command, sudo ldbsearch -H > sam.ldb '(objectclass=computer)' dn returns a slew of errors. > http://paste.opensuse.org/view/simple/61443635 > > I need the data out of this as the server it's from is supposed to be > production. Is there a way to either repair it or recover any > portions of it into a new sam.ldb? I'm open to suggestions. > > Thanks, > > Torin Woltjer > > Grand Dial Communications - A ZK Tech Inc. Company > > 616.776.1066 ext. 2006 > www.granddial.com > >Are you in the private directory when you issue the 'ldbsearch' command ? Try it again with the full path to sam.ldb e.g. /var/lib/samba/private/sam.ldb If your database is damaged, try running 'samba-tool dbcheck' If this shows errors, run it again and add '--fix' Rowland
On Tue, 2018-09-25 at 15:38 +0000, Torin Woltjer via samba wrote:> sam.ldb on a domain seems corrupted. A fresh domain works fine so > samba itself seems fine. Running the command, sudo ldbsearch -H > sam.ldb '(objectclass=computer)' dn returns a slew of errors. http:// > paste.opensuse.org/view/simple/61443635This is indeed a corrupt TDB.> I need the data out of this as the server it's from is supposed to be > production. Is there a way to either repair it or recover any > portions of it into a new sam.ldb? I'm open to suggestions.There is a utility ldbdump that has a '-e' mode matching the tdbdump it is based on. It can help you recover some of the lost objects, to then start to slow process of putting your domain back together. Run that on each backend file and the main sam.ldb. These are not complete instructions, you will then have to rebuild a not corrupt DB with the same parameters and re-insert the records (carefully). As it is from production I would recommend professional help. Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba