root@mserv:#/usr/share/samba/setup/provision --realm=example.local --domain=example --adminpass=4sweNdooG --server-role='domain controller' Looking up IPv4 addresses Looking up IPv6 addresses No IPv6 address will be assigned Setting up share.ldb Setting up secrets.ldb Setting up the registry Setting up the privileges database Setting up idmap db Setting up SAM db Setting up sam.ldb partitions and settings Setting up sam.ldb rootDSE Pre-loading the Samba 4 and AD schema Adding DomainDN: DC=example,DC=local Adding configuration container Setting up sam.ldb schema Setting up sam.ldb configuration data Setting up display specifiers Adding users container Modifying users container Adding computers container Modifying computers container Setting up sam.ldb data Setting up well known security principals Setting up sam.ldb users and groups Setting up self join Adding DNS accounts Creating CN=MicrosoftDNS,CN=System,DC=example,DC=local Creating DomainDnsZones and ForestDnsZones partitions Populating DomainDnsZones and ForestDnsZones partitions See /var/lib/samba/private/named.conf for an example configuration include file for BIND and /var/lib/samba/private/named.txt for further documentation required for secure DNS updates Setting up sam.ldb rootDSE marking as synchronized Fixing provision GUIDs A Kerberos configuration suitable for Samba 4 has been generated at /var/lib/samba/private/krb5.conf A phpLDAPadmin configuration file suitable for administering the Samba 4 LDAP server has been created in /var/lib/samba/private/phpldapadmin-config.php . Once the above files are installed, your Samba4 server will be ready to use Server Role: domain controller Hostname: mserv NetBIOS Domain: EXAMPLE DNS Domain: example.local DOMAIN SID: S-1-5-21-1715263971-3761441621-3169644295
root@mserv:# netstat -tupl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:3268 *:* LISTEN 1327/samba tcp 0 0 *:3269 *:* LISTEN 1327/samba tcp 0 0 *:ldap *:* LISTEN 1327/samba tcp 0 0 *:loc-srv *:* LISTEN 1324/samba tcp 0 0 *:netbios-ssn *:* LISTEN 1323/samba tcp 0 0 *:kpasswd *:* LISTEN 1329/samba tcp 0 0 mserv.example.lo:domain *:* LISTEN 1301/named tcp 0 0 localhost:domain *:* LISTEN 1301/named tcp 0 0 *:ssh *:* LISTEN 658/sshd tcp 0 0 *:kerberos *:* LISTEN 1329/samba tcp 0 0 localhost:953 *:* LISTEN 1301/named tcp 0 0 *:ldaps *:* LISTEN 1327/samba tcp 0 0 *:microsoft-ds *:* LISTEN 1323/samba tcp 0 0 *:1024 *:* LISTEN 1324/samba tcp6 0 0 [::]:3268 [::]:* LISTEN 1327/samba tcp6 0 0 [::]:3269 [::]:* LISTEN 1327/samba tcp6 0 0 [::]:ldap [::]:* LISTEN 1327/samba tcp6 0 0 [::]:loc-srv [::]:* LISTEN 1324/samba tcp6 0 0 [::]:netbios-ssn [::]:* LISTEN 1323/samba tcp6 0 0 [::]:kpasswd [::]:* LISTEN 1329/samba tcp6 0 0 [::]:ssh [::]:* LISTEN 658/sshd tcp6 0 0 [::]:kerberos [::]:* LISTEN 1329/samba tcp6 0 0 [::]:ldaps [::]:* LISTEN 1327/samba tcp6 0 0 [::]:microsoft-ds [::]:* LISTEN 1323/samba tcp6 0 0 [::]:1024 [::]:* LISTEN 1324/samba udp 0 0 mserv.example.loca:ldap *:* 1328/samba udp 0 0 *:ldap *:* 1328/samba udp 0 0 mserv.example.l:kpasswd *:* 1329/samba udp 0 0 *:kpasswd *:* 1329/samba udp 0 0 mserv.example.lo:domain *:* 1301/named udp 0 0 localhost:domain *:* 1301/named udp 0 0 mserv.example.:kerberos *:* 1329/samba udp 0 0 *:kerberos *:* 1329/samba udp 0 0 mserv.exampl:netbios-ns *:* 1325/samba udp 0 0 192.168.2.25:netbios-ns *:* 1325/samba udp 0 0 *:netbios-ns *:* 1325/samba udp 0 0 mserv.examp:netbios-dgm *:* 1325/samba udp 0 0 192.168.2.2:netbios-dgm *:* 1325/samba udp 0 0 *:netbios-dgm *:* 1325/samba udp6 0 0 fe80::5054:ff:fe8c:ldap [::]:* 1328/samba udp6 0 0 [::]:ldap [::]:* 1328/samba udp6 0 0 fe80::5054:ff:f:kpasswd [::]:* 1329/samba udp6 0 0 [::]:kpasswd [::]:* 1329/samba udp6 0 0 fe80::5054:ff::kerberos [::]:* 1329/samba udp6 0 0 [::]:kerberos [::]:* 1329/samba
server services = +smb -s3fs dcerpc endpoint servers = +winreg +srvsvc
libdcerpc-server0 libdcerpc0 libgensec0 libndr-standard0 libndr0 libregistry0 libsamba-credentials0 libsamba-hostconfig0 libsamba-policy0 libsamdb0 libsmbclient-raw0 python-samba samba-dsdb-modules samba4 samba4-common-bin python-ldb libsamba-util0
Source: https://habr.com/ru/post/147378/
All Articles