Pada Sen, 19 Agu 2024 pukul 16.36 Rowland Penny via samba <
samba at lists.samba.org> menulis:
> On Mon, 19 Aug 2024 15:40:15 +0700
> fransnicho via samba <samba at lists.samba.org> wrote:
>
>
> > Hi Rowland,
> > Thanks for your response ?
> >
> > If I succesfully upgrade DC4 (the karoshi samba package) to samba
> > 4.20, is there any posibilities that i can join the new samba machine
> > (DC6) to the DC4 ?
>
> Possibly, try it.
>
> > If I rebuild new machine, what data will be lost from my DC4 (the
> > karoshi samba package) ?
>
> If you can backup your domain, then you should retain everything
> relating to the AD domain. Try reading this:
>
> https://wiki.samba.org/index.php/Back_up_and_Restoring_a_Samba_AD_DC
>
> Rowland
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
Hi Rowland,
Thanks for your response ?
Accidentally, I found 2 old backup files of my AD. As I recall, one
backup file before i did the upgraded still in samba 4.15 (default of
ubuntu 20) and the other backup file after the upgraded on samba
4.19.5+karoshi
When I try to restore the old backup file (the one before i did the
upgraded), i found the same error with my new samba that can't join my
existing AD.
I already try to restore the old backup file in DC5 ubuntu 20 with
samba 4.19.5+karoshi-1~linuxschools1+focal1 and in DC6 ubuntu 24 with
samba 4.19.5 and in DC7 debian 12 with samba 4.20.2
it at dc5:~$ sudo samba-tool domain backup restore
--backup-file=/home/it/samba-backup-2023-02-18T09-28-56.646109.tar.bz2
--targetdir=/var/lib/samba --newservername=dc5.nicho.com
Adding new DC to site 'Default-First-Site-Name'
Updating basic smb.conf settings...
Creating account with SID: S-1-5-21-2170936618-152811847-3992523897-2697
Adding CN=DC5.NICHO.COM,OU=Domain Controllers,DC=nicho,DC=com
Adding
CN=DC5.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com
Adding CN=NTDS
Settings,CN=DC5.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com
ERROR(ldb): uncaught exception - objectclass_attrs: attribute
'hasMasterNCs' on entry 'CN=NTDS
Settings,CN=DC5.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com'
does not exist in the specified objectclasses!
File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line
279, in _run
return self.run(*args, **kwargs)
File "/usr/lib/python3/dist-packages/samba/netcmd/domain/backup.py",
line 562, in run
ctx.join_add_objects(specified_sid=dom_sid(str(sid)))
File "/usr/lib/python3/dist-packages/samba/join.py", line 673, in
join_add_objects
ctx.join_add_ntdsdsa()
File "/usr/lib/python3/dist-packages/samba/join.py", line 594, in
join_add_ntdsdsa
ctx.samdb.add(rec, controls=["relax:0"])
it at dc6:~$ sudo samba-tool domain backup restore
--backup-file=/home/it/samba-backup-2024-08-20T19-50-49.727302.tar.bz2
--targetdir=/var/lib/samba --newservername=DC6.nicho.com
Adding new DC to site 'Default-First-Site-Name'
Updating basic smb.conf settings...
Creating account with SID: S-1-5-21-2170936618-152811847-3992523897-3058
Adding CN=DC6.NICHO.COM,OU=Domain Controllers,DC=nicho,DC=com
Adding
CN=DC6.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com
Adding CN=NTDS
Settings,CN=DC6.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com
ERROR(ldb): uncaught exception - objectclass_attrs: attribute
'hasMasterNCs' on entry 'CN=NTDS
Settings,CN=DC6.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com'
does not exist in the specified objectclasses!
File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line
279, in _run
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/samba/netcmd/domain/backup.py",
line 562, in run
ctx.join_add_objects(specified_sid=dom_sid(str(sid)))
File "/usr/lib/python3/dist-packages/samba/join.py", line 673, in
join_add_objects
ctx.join_add_ntdsdsa()
File "/usr/lib/python3/dist-packages/samba/join.py", line 594, in
join_add_ntdsdsa
ctx.samdb.add(rec, controls=["relax:0"])
root at dc7:~# sudo samba-tool domain backup restore
--backup-file=/home/it/samba-backup-2023-02-18T09-28-56.646109.tar.bz2
--targetdir=/var/lib/samba --newservername=DC7.nicho.com
Adding new DC to site 'Default-First-Site-Name'
Updating basic smb.conf settings...
Creating account with SID: S-1-5-21-2170936618-152811847-3992523897-2697
Adding CN=DC7.NICHO.COM,OU=Domain Controllers,DC=nicho,DC=com
Adding
CN=DC7.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com
Adding CN=NTDS
Settings,CN=DC7.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com
ERROR(ldb): uncaught exception - objectclass_attrs: attribute
'hasMasterNCs' on entry 'CN=NTDS
Settings,CN=DC7.NICHO.COM,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nicho,DC=com'
does not exist in the specified objectclasses!
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/backup.py",
line 562, in run
ctx.join_add_objects(specified_sid=dom_sid(str(sid)))
File "/usr/lib/python3/dist-packages/samba/join.py", line 665, in
join_add_objects
ctx.join_add_ntdsdsa()
File "/usr/lib/python3/dist-packages/samba/join.py", line 586, in
join_add_ntdsdsa
ctx.samdb.add(rec, controls=["relax:0"])
Is it possible to fix a broken AD database ? Is there any
possibilities to fix it by doing the samba upgrade of my samba
4.19.5+karoshi ?
Best Regards,
Nicho.