Skip to content

Instantly share code, notes, and snippets.

@zv0r
Created May 8, 2019 08:32
Show Gist options
  • Save zv0r/50119b5cf0d7edeac9f844fa1d309886 to your computer and use it in GitHub Desktop.
Save zv0r/50119b5cf0d7edeac9f844fa1d309886 to your computer and use it in GitHub Desktop.
Samba 4.10.2 join DC to the domain
INFO 2019-05-08 11:28:02,916 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #103: Finding a writeable DC for domain 'corp.company.ru'
INFO 2019-05-08 11:28:02,939 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #105: Found DC mskdc.corp.company.ru
Password for [CORP\administrator]:
INFO 2019-05-08 11:28:06,489 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1519: workgroup is CORP
INFO 2019-05-08 11:28:06,490 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1522: realm is corp.company.ru
Adding CN=SPBDC,OU=Domain Controllers,DC=corp,DC=company,DC=ru
Adding CN=SPBDC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=corp,DC=company,DC=ru
Adding CN=NTDS Settings,CN=SPBDC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=corp,DC=company,DC=ru
Adding SPNs to CN=SPBDC,OU=Domain Controllers,DC=corp,DC=company,DC=ru
Setting account password for SPBDC$
Enabling account
Adding DNS account CN=dns-SPBDC,CN=Users,DC=corp,DC=company,DC=ru with dns/ SPN
Setting account password for dns-SPBDC
Calling bare provision
INFO 2019-05-08 11:28:07,825 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2079: Looking up IPv4 addresses
INFO 2019-05-08 11:28:07,826 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2096: Looking up IPv6 addresses
WARNING 2019-05-08 11:28:07,827 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2103: No IPv6 address will be assigned
INFO 2019-05-08 11:28:08,115 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2269: Setting up share.ldb
INFO 2019-05-08 11:28:09,161 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2273: Setting up secrets.ldb
INFO 2019-05-08 11:28:09,811 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2279: Setting up the registry
INFO 2019-05-08 11:28:12,012 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2282: Setting up the privileges database
INFO 2019-05-08 11:28:13,282 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2285: Setting up idmap db
INFO 2019-05-08 11:28:14,135 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2292: Setting up SAM db
INFO 2019-05-08 11:28:14,284 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #882: Setting up sam.ldb partitions and settings
INFO 2019-05-08 11:28:14,295 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #894: Setting up sam.ldb rootDSE
INFO 2019-05-08 11:28:14,446 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #1297: Pre-loading the Samba 4 and AD schema
Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs
INFO 2019-05-08 11:28:14,819 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2342: A Kerberos configuration suitable for Samba AD has been generated at /usr/local/samba/private/krb5.conf
INFO 2019-05-08 11:28:14,820 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/__init__.py #2343: Merge the contents of this file with your system krb5.conf or replace it with this one. Do not create a symlink!
Provision OK for domain DN DC=corp,DC=company,DC=ru
Starting replication
Schema-DN[CN=Schema,CN=Configuration,DC=corp,DC=company,DC=ru] objects[402/1550] linked_values[0/0]
Schema-DN[CN=Schema,CN=Configuration,DC=corp,DC=company,DC=ru] objects[804/1550] linked_values[0/0]
Schema-DN[CN=Schema,CN=Configuration,DC=corp,DC=company,DC=ru] objects[1206/1550] linked_values[0/0]
Schema-DN[CN=Schema,CN=Configuration,DC=corp,DC=company,DC=ru] objects[1550/1550] linked_values[0/0]
Analyze and apply schema objects
Partition[CN=Configuration,DC=corp,DC=company,DC=ru] objects[402/1616] linked_values[0/1]
Partition[CN=Configuration,DC=corp,DC=company,DC=ru] objects[804/1616] linked_values[0/1]
Partition[CN=Configuration,DC=corp,DC=company,DC=ru] objects[1206/1616] linked_values[0/1]
Partition[CN=Configuration,DC=corp,DC=company,DC=ru] objects[1608/1616] linked_values[0/1]
Partition[CN=Configuration,DC=corp,DC=company,DC=ru] objects[1616/1616] linked_values[30/30]
Replicating critical objects from the base DN of the domain
Partition[DC=corp,DC=company,DC=ru] objects[98/98] linked_values[23/23]
Partition[DC=corp,DC=company,DC=ru] objects[270/270] linked_values[23/23]
Done with always replicated NC (base, config, schema)
Replicating DC=DomainDnsZones,DC=corp,DC=company,DC=ru
Partition[DC=DomainDnsZones,DC=corp,DC=company,DC=ru] objects[40/40] linked_values[0/0]
Replicating DC=ForestDnsZones,DC=corp,DC=company,DC=ru
Partition[DC=ForestDnsZones,DC=corp,DC=company,DC=ru] objects[18/18] linked_values[0/0]
Exop on[CN=RID Manager$,CN=System,DC=corp,DC=company,DC=ru] objects[3] linked_values[0]
Committing SAM database
INFO 2019-05-08 11:28:24,072 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1097: Adding 1 remote DNS records for SPBDC.corp.company.ru
INFO 2019-05-08 11:28:24,168 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1160: Adding DNS A record SPBDC.corp.company.ru for IPv4 IP: 172.17.50.1
INFO 2019-05-08 11:28:24,208 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1188: Adding DNS CNAME record a0714e36-2d5e-4ad6-825f-3130625a651b._msdcs.corp.company.ru for SPBDC.corp.company.ru
INFO 2019-05-08 11:28:24,237 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1213: All other DNS records (like _ldap SRV records) will be created samba_dnsupdate on first startup
INFO 2019-05-08 11:28:24,238 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1218: Replicating new DNS records in DC=DomainDnsZones,DC=corp,DC=company,DC=ru
Partition[DC=DomainDnsZones,DC=corp,DC=company,DC=ru] objects[2/2] linked_values[0/0]
INFO 2019-05-08 11:28:24,458 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1218: Replicating new DNS records in DC=ForestDnsZones,DC=corp,DC=company,DC=ru
Partition[DC=ForestDnsZones,DC=corp,DC=company,DC=ru] objects[2/2] linked_values[0/0]
INFO 2019-05-08 11:28:24,652 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1233: Sending DsReplicaUpdateRefs for all the replicated partitions
INFO 2019-05-08 11:28:24,712 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1263: Setting isSynchronized and dsServiceName
INFO 2019-05-08 11:28:24,785 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1278: Setting up secrets database
INFO 2019-05-08 11:28:26,377 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/sambadns.py #1262: See /usr/local/samba/bind-dns/named.conf for an example configuration include file for BIND
INFO 2019-05-08 11:28:26,378 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/provision/sambadns.py #1264: and /usr/local/samba/bind-dns/named.txt for further documentation required for secure DNS updates
INFO 2019-05-08 11:28:26,378 pid:583 /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1536: Joined domain CORP (SID S-1-5-21-251640278-3689042892-2886705341) as a DC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment