This is an old revision of the document!
# apt install samba winbind # rm /etc/samba/smb.conf
server# samba-tool domain provision --use-rfc2307 --interactive
... Realm [CORPX.UN]: Domain [CORPX]: Server Role (dc, member, standalone) [dc]: DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: DNS forwarder IP address (write 'none' to disable forwarding) [172.16.1.254]: Administrator password: Pa$$w0rd Retype password: Pa$$w0rd ...
server# cp /var/lib/samba/private/krb5.conf /etc/krb5.conf server# testparm debian# systemctl disable smbd debian# systemctl unmask samba-ad-dc.service debian# systemctl enable samba-ad-dc.service server# cat /etc/samba/smb.conf
[global] ldap server require strong auth = no ...
server# init 6 server# cat /etc/resolv.conf
search corpX.un nameserver 127.0.0.1
# samba-tool user create user1 'Pa$$w0rd1' --given-name Ivan --initials I --surname Ivanov --uid-number 10001 --gid-number 10001 --login-shell /bin/bash --unix-home /home/user1 # samba-tool group add guser1 --nis-domain=CORP13 --gid-number=10001 # samba-tool user create user2 --given-name Petr --initials P --surname Petrov # samba-tool user setpassword user2 # samba-tool user list
# kinit Administrator # samba-tool dns add server corpX.un gate A 192.168.X.1 # samba-tool dns delete server corpX.un gate A 192.168.X.1 # samba-tool dns add server corpX.un _xmpp-client._tcp SRV 'gate.corpX.un 5222 0 0'
PS C:\Users\Administrator> Get-ADForest PS C:\Users\Administrator> Get-ADDomain PS C:\Users\Administrator> Set-ADForestMode –Identity "corp13.un" -ForestMode Windows2008R2Forest PS C:\Users\Administrator> Set-ADDomainMode –Identity "corp13.un" –DomainMode Windows2008R2Domain
server2.corp13.un:~# kinit administrator server2.corp13.un:~# samba-tool domain join corp13.un DC -k yes --dns-backend=SAMBA_INTERNAL --option="dns forwarder=172.16.1.254"
server2.corp13.un:~# samba-tool drs showrepl server2.corp13.un:~# samba-tool user list server2.corp13.un:~# samba-tool user create user4 'Pa$$w0rd4' --given-name 'Василий' --initials 'М' --surname 'Кошкин' В AD появится с задержкой до 10 минут server2.corp13.un:~# samba-tool ldapcmp ldap://server.corp13.un ldap://server2.corp13.un -Uadministrator Допустимы ERROR, но должны быть и SUCCESS PS C:\Users\Administrator> robocopy \\SERVER\SYSVOL\corp13.un\ \\SERVER2\SYSVOL\corp13.un\ /mir /sec server2.corp13.un:~# samba-tool ntacl sysvolcheck ошибки
server2.corp13.un:~# samba-tool fsmo show
PS C:\Users\Administrator> ntdsutil
roles connections connect to server server2 q transfer naming master transfer infrastructure master transfer rid master transfer schema master transfer pdc q q
server2.corp13.un:~# samba-tool fsmo seize --role=forestdns server2.corp13.un:~# samba-tool fsmo seize --role=domaindns server2.corp13.un:~# samba-tool fsmo show
gate# cat /etc/resolv.conf search corp13.un nameserver 192.168.13.12
server2# nslookup -q=SRV _kerberos._tcp.corp13.un server2# samba-tool domain demote --remove-other-dead-server=SERVER server2# nslookup -q=SRV _kerberos._tcp.corp13.un