Samba 4 AD DC на Ubuntu Server 12.10 с Bind 9.9.2-P1 в качестве DNS.

Список команд из видео.

sudo su -
/etc/init.d/apparmor stop
update-rc.d -f apparmore remove
aptitude remove apparmor
sudo apt-get update && sudo apt-get upgrade
vi /etc/network/interfaces
/etc/init.d/networking restart
vi /etc/hosts
127.0.0.1 samba.samdom.example.com samba
cat /etc/hosts
echo samba.samdom.examle.com > /etc/hostname
cat /etc/hostname
reboot
hostname
hostname -f
apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev acl
cat /boot/config-`uname -r` | grep CONFIG_EXT
vi /etc/fstab
#подсказка dd - удалить строку
/dev/mapper/samba-root / ext4 errors=remount-ro,user_xattr,acl,barrier=1 1 1
cat /etc/fstab
reboot
touch test.txt
setfattr -n user.test -v test test.txt
setfattr -n security.test -v test2 test.txt
getfattr -d test.txt
getfattr -n security.test test.txt
touch test3.txt
setfacl -m g:adm:rwx test3.txt
getfacl test3.txt
apt-get install git
git clone git://git.samba.org/samba.git samba-master
cd samba-master
./configure --enable-debug --enable-selftest
make
make install
apt-get install bind9
named -V
apt-get remove bind9
apt-get install libkrb5-dev libssl-dev
cd /root
wget ftp://ftp.isc.org/isc/bind9/9.9.2-P1/bind-9.9.2-P1.tar.gz
tar -zxvf bind-9.9.2-P1.tar.gz
cd bind-9.9.2-P1
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc/bind --localstatedir=/var --enable-largefile --with-libtool --enable-shared --enable-static --with-openssl=/usr --with-gssapi=/usr --with-gnu-ld --with-geoip=/usr --enable-ipv6 --with-dlopen=yes
make
make install
/etc/init.d/bind9 start
ps ax
named -V
/usr/local/samba/bin/samba-tool domain provision --dns-backend=BIND9_DLZ --domain=SAMDOM --realm=SAMDOM.EXAMPLE.COM
vi /etc/network/interfaces
dns-nameservers 192.168.1.2
cat /etc/network/interfaces
/etc/init.d/networking restart
ping www.ya.ru
vi /usr/local/samba/share/setup/krb5.conf
SAMDOM.EXAMPLE.COM
mv /usr/local/samba/share/setup/krb5.conf /etc/krb5.conf
cat /etc/krb5.conf
vi /etc/bind/named.conf.local
include "/usr/local/samba/private/named.conf";
cat /etc/bind/named.conf.local
vi /usr/local/samba/private/named.conf
cat /usr/local/samba/private/named.conf
vi /etc/bind/named.conf.options
tkey-gssapi-keytab "/usr/local/samba/private/dns.keytab";
cat /etc/bind/named.conf.options
chgrp bind /usr/local/samba/private/dns.keytab
chmod g+r /usr/local/samba/private/dns.keytab
/etc/init.d/bind9 restart
/usr/local/samba/sbin/samba                 /usr/local/samba/sbin/samba -i -M single
ping samdom.example.com
/usr/local/samba/sbin/samba -V
/usr/local/samba/bin/smbclient --version
/usr/local/samba/bin/smbclient -L localhost -U%

/usr/local/samba/bin/samba-tool user setpassword Administrator
/usr/local/samba/bin/smbclient //localhost/netlogon -UAdministrator%'Pa$$w0rd' -c 'ls'
host -t SRV _ldap._tcp.samdom.example.com
host -t SRV _kerberos._udp.samdom.example.com
host -t A samba.samdom.example.com
/usr/local/samba/sbin/samba_dnsupdate --verbose --all-names
kinit Administrator@SAMDOM.EXAMPLE.COM
klist
apt-get install ntp ntpdate
ntpd -v
vi /etc/ntp.conf
server 127.127.1.0
fudge 127.127.1.0 stratum 10
server 0.pool.ntp.org iburst prefer
server 1.pool.ntp.org iburst prefer
driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp
ntpsigndsocket/usr/local/samba/var/lib/ntp_signd/
restrict default kod nomodify notrap nopeer mssntp
restrict 127.0.0.1
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
cat /etc/ntp.conf
service ntp restart
exit