Error Samba Replication with removed DC

Hi,
i removed a DC (replaced it by another ith different IP/Name).
System Diagnosis gives error on Samba Replication.
I removed the old Server everywhere i found him, including samba database.

root@ucs:~# samba-tool dbcheck
Checking 495 objects
Checked 495 objects (0 errors)

root@ucs:~# univention-ldapsearch -b "CN=UCSBAK,DC=friedrichnet,DC=de"
# extended LDIF
#
# LDAPv3
# base <CN=UCSBAK,DC=friedrichnet,DC=de> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 3
result: 32 No such object
matchedDN: dc=friedrichnet,dc=de

# numResponses: 1

`samba-tool drs showrepl` gibt ein Problem mit der Replikation zurück.
In eingehend 'DC=ForestDnsZones,DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In eingehend 'DC=DomainDnsZones,DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In eingehend 'DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In eingehend 'CN=Schema,CN=Configuration,DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In eingehend 'CN=Configuration,DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'DC=ForestDnsZones,DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'DC=DomainDnsZones,DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'CN=Schema,CN=Configuration,DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'CN=Configuration,DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
>

How do i remove These old entries?

Hi,

You’ll have to delete the Server in AD Domain DNS

grafik
through RSAT Tools
rg
Christian

Geht nicht so einfach:
RSAT-DC
RSAT-DC_01
RSAT-DC_02
RSAT-DC_03
Liegt wohl daran, dass der schon nicht mehr zur Domäne gehört …

I find the following remaining objects in LDAP:

root@ucs:~# univention-ldapsearch -LLL  | grep -E 'dn:|ucsbak'|grep -B 1 ucsbak
dn: cn=default-settings,cn=ldap,cn=policies,dc=friedrichnet,dc=de
univentionLDAPServer: ucsbak.friedrichnet.de
--
dn: univentionAppID=fetchmail_6.3.26,cn=fetchmail,cn=apps,cn=univention,dc=fri
univentionAppInstalledOnServer: ucsbak.friedrichnet.de
--
dn: univentionAppID=dhcp-server_12.0,cn=dhcp-server,cn=apps,cn=univention,dc=f
univentionAppInstalledOnServer: ucsbak.friedrichnet.de
--
dn: univentionAppID=samba4_4.7,cn=samba4,cn=apps,cn=univention,dc=friedrichnet
univentionAppInstalledOnServer: ucsbak.friedrichnet.de
dn: univentionAppID=kopano-webapp_3.4.2.1108,cn=kopano-webapp,cn=apps,cn=unive
univentionAppInstalledOnServer: ucsbak.friedrichnet.de
dn: univentionAppID=z-push-kopano_2.3.8,cn=z-push-kopano,cn=apps,cn=univention
univentionAppInstalledOnServer: ucsbak.friedrichnet.de
dn: univentionAppID=kopano-core_8.4.5.0,cn=kopano-core,cn=apps,cn=univention,d
univentionAppInstalledOnServer: ucsbak.friedrichnet.de
root@ucs:~#

I can’t correct even the ‘default-setting’: cn=default-settings,cn=ldap,cn=policies,dc=friedrichnet,dc=de
The LDAP webmask also looks some Kind of broken:
LDAP_UI
Deleting empty lines doesn’t work, even saving it does not give an error, it is still the same with the empty entries, unable to Change it.

No Idea how to delete the remaining eintries in samba?

Hi,

you should be able to remove the entries through the UMC - Domain - LDAP (blue section). If not, use ldapdelete.

For Samba you could use ldbdel.

/CV

Hi,
Thanks for the Reply

What is the command to delete e.g. the above entry?

Edit:

root@ucs:~# ldapmodify -v -D "cn=admin,dc=friedrichnet,dc=de" -y /etc/ldap.secret
ldap_initialize( <DEFAULT> )
dn: univentionAppID=z-push-kopano_2.3.8,cn=z-push-kopano,cn=apps,cn=univention,dc=friedrichnet,dc=de
changetype: modify
delete: univentionAppInstalledOnServer
univentionAppInstalledOnServer: ucsbak.friedrichnet.de

That worked for all LDAP entries so far.

Still must correct the old Samba-Entries:

In eingehend 'DC=ForestDnsZones,DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In eingehend 'DC=DomainDnsZones,DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In eingehend 'DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In eingehend 'CN=Schema,CN=Configuration,DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In eingehend 'CN=Configuration,DC=friedrichnet,DC=de': Fehler während der DRS Replikation von Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'DC=ForestDnsZones,DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'DC=DomainDnsZones,DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'CN=Schema,CN=Configuration,DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).
In ausgehend 'CN=Configuration,DC=friedrichnet,DC=de': Fehler während der DRS Replikation nach Default-First-Site-Name/UCSBAK (WERR_FILE_NOT_FOUND).

Solved:

root@ucs:~# univention-s4search --cross-ncs "(&(objectClass=server)(CN=UCSBAK))" serverReference | ldapsearch-wrapper
# record 1
dn: CN=UCSBAK,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=friedrichnet,DC=de

# returned 1 records
# 1 entries
# 0 referrals
root@ucs:~# ldbdel -H /var/lib/samba/private/sam.ldb \
> CN=UCSBAK,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=friedrichnet,DC=de \
> --recursive
Deleted 2 records
root@ucs:~# samba-tool drs kcc
Consistency check on ucs.friedrichnet.de successful.
root@ucs:~# /usr/share/univention-samba4/scripts/check_essential_samba4_dns_records.sh | grep -i ucsbak
4 Likes

thx to “neobiker”, your last Post solved my problem :+1:t3:

Mastodon