Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung Nächste Überarbeitung Beide Seiten, nächste Überarbeitung | ||
lpi2:samba-ad [2020/12/11 14:44] ingo_wichmann [Samba Tool] |
lpi2:samba-ad [2021/01/10 09:28] ingo_wichmann [Vorraussetzungen] |
||
---|---|---|---|
Zeile 2: | Zeile 2: | ||
Siehe auch: https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO | Siehe auch: https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO | ||
- | Installation mit debian 8 getestet. | + | Installation mit debian 10 getestet. |
- | hostnamectl set-hostname vm2 | + | ===== Vorraussetzungen ===== |
- | + | ||
- | DHCP abschalten, auf statische IP-Adresse umstellen: | + | |
+ | * Statische IP-Adresse (per DHCP oder in lokaler Konfigurationsdatei) (( z.B. | ||
<file txt /etc/network/interfaces> | <file txt /etc/network/interfaces> | ||
auto eth0 | auto eth0 | ||
iface eth0 inet static | iface eth0 inet static | ||
- | address 192.168.215.2 | + | address 192.168.215.2/24 |
- | netmask 255.255.255.0 | + | |
gateway 192.168.215.1 | gateway 192.168.215.1 | ||
</file> | </file> | ||
+ | )) | ||
+ | * FQDN der Form servername.domain.tld | ||
+ | (( [[admin_grundlagen:lxd|LXD]] Konfiguration: | ||
+ | lxc network set lxdbr0 dns.domain kurs.linuxhotel.de | ||
+ | | ||
+ | lxc init images:debian/10 test1 | ||
+ | lxc config set test1 security.privileged=true | ||
+ | lxc network attach lxdbr0 test1 eth0 eth0 | ||
+ | lxc config device set test1 eth0 ipv4.address 192.168.239.10 | ||
+ | lxc start test1 | ||
+ | lxc exec test1 -- /bin/bash | ||
+ | )) | ||
===== Pakete ===== | ===== Pakete ===== | ||
- | apt-get install samba winbind libnss-winbind | + | apt install samba winbind |
- | Zum debuggen: | + | Optional, zum debuggen: |
- | apt-get install smbclient ldb-tools krb5-user ldap-utils | + | apt install smbclient ldb-tools krb5-user ldap-utils dnsutils |
(( | (( | ||
Alternativ: Pakete von sernet | Alternativ: Pakete von sernet | ||
Zeile 41: | Zeile 51: | ||
)) | )) | ||
- | service samba stop | + | ===== Dienste stoppen ===== |
service samba-ad-dc stop | service samba-ad-dc stop | ||
- | service smbd stop | + | systemctl disable --now nmbd.service |
- | service nmbd stop | + | systemctl disable --now smbd.service |
- | service winbind stop | + | systemctl disable --now winbind.service |
| | ||
mv /etc/samba/smb.conf{,.orig} | mv /etc/samba/smb.conf{,.orig} | ||
Zeile 54: | Zeile 65: | ||
samba-tool | samba-tool | ||
samba-tool domain provision --help | samba-tool domain provision --help | ||
- | samba-tool domain provision --use-rfc2307 | + | samba-tool domain provision |
(( | (( | ||
oder: | oder: | ||
- | samba-tool domain provision --use-xattrs=yes | + | samba-tool domain provision --use-rfc2307 --use-xattrs=yes |
+ | Alternative zu --use-xattrs=yes siehe https://wiki.samba.org/index.php/Samba4/s3fs | ||
)) | )) | ||
((bei Problemen, z.B. Passwort zu einfach: | ((bei Problemen, z.B. Passwort zu einfach: | ||
rm /etc/samba/smb.conf | rm /etc/samba/smb.conf | ||
- | )) | ||
- | (( Alternative zu --use-xattrs=yes siehe https://wiki.samba.org/index.php/Samba4/s3fs | ||
)) | )) | ||
Realm: KURS.LINUXHOTEL.DE | Realm: KURS.LINUXHOTEL.DE | ||
Zeile 93: | Zeile 103: | ||
testparm | testparm | ||
- | service nmbd start | + | systemctl unmask samba-ad-dc |
- | service smbd start | + | systemctl enable --now samba-ad-dc |
- | service samba-ad-dc start | + | |
+ | ===== testen ===== | ||
Offene Ports checken: | Offene Ports checken: | ||
Zeile 142: | Zeile 153: | ||
Benutzer anlegen: | Benutzer anlegen: | ||
- | samba-tool user add heinz villa | + | samba-tool user add heinz |
===== NTP installieren ===== | ===== NTP installieren ===== | ||
+ | TODO: das macht man heute mit chrony | ||
+ | |||
siehe https://wiki.samba.org/index.php/Time_Synchronisation | siehe https://wiki.samba.org/index.php/Time_Synchronisation | ||
apt-get install ntp | apt-get install ntp |