lpi2:samba-ad
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| lpi2:samba-ad [2020/12/11 14:44] – [Samba Tool] ingo_wichmann | lpi2:samba-ad [2026/09/11 13:06] (aktuell) – add missing packages for samba-ad natureshadow2 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== Samba4 ====== | ====== Samba4 ====== | ||
| - | Siehe auch: https:// | + | Siehe auch: https:// |
| - | Installation mit debian | + | Installation mit debian |
| - | 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 / | <file txt / | ||
| 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 | ||
| </ | </ | ||
| + | )) | ||
| + | * FQDN der Form servername.domain.tld wird von '' | ||
| + | * '' | ||
| + | * ActiveDirectory Ports nicht von anderen Diensten belegt (( | ||
| + | lsof -i : | ||
| + | -> leer | ||
| + | )) | ||
| + | (( [[admin_grundlagen: | ||
| + | lxc network set lxdbr0 dns.domain kurs.linuxhotel.de | ||
| + | | ||
| + | lxc init images: | ||
| + | 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 | + | apt install samba winbind |
| - | Zum debuggen: | + | |
| - | | + | ++++ Vorsicht mit Samba-Paketen vor Debian 12 (bookworm) | |
| - | (( | + | |
| - | Alternativ: Pakete von sernet | + | Michael Tokarev < |
| + | |||
| + | //"It come to my attention that a discussion is happening about samba | ||
| + | and LTS (and the same applies to oldstable too). | ||
| + | |||
| + | The thing is: samba packages in bullseye and before, in my opinion, | ||
| + | are hopeless. | ||
| + | it was. For years (for a few debian releases), samba maintenance was | ||
| + | more on auto-pilot. Most changes were made by applying a minimal change, | ||
| + | not the right change. The result was.. horrible. | ||
| + | |||
| + | Now, the Samba team basically re-designed whole VFS layer in 4.16, to | ||
| + | fix a few serious issues with symlinks. | ||
| + | anything, and it changes quite big portion of the codebase, so subsequent | ||
| + | fixes even in seemingly unrelated areas don't apply anymore (not all | ||
| + | of them ofc). | ||
| + | |||
| + | Upstream stopped supporting 4.13 (bullseye) version of samba even before | ||
| + | bullseye release iirc. There were numerous alternative samba repositories | ||
| + | all around the world to plug the gap between debian-provided samba and | ||
| + | actual samba. | ||
| + | |||
| + | There are numerous other security issues, compatibility issues with | ||
| + | previous windows releases, and other stuff which basically makes samba | ||
| + | in bullseye (already, not to mention buster!) basically unusable. | ||
| + | |||
| + | Trying to fix an issue or two there will work. This particular issue | ||
| + | with Jul-23 windows10/ | ||
| + | applies | ||
| + | |||
| + | But I urge not doing this. This will bring false sense of security. | ||
| + | People will think samba in buster or bullseye is worth to keep since | ||
| + | it is being " | ||
| + | |||
| + | It is like with old crypto, - you fix a buffer overflow in some DES | ||
| + | implementation, | ||
| + | |||
| + | If there' | ||
| + | example my repository at http:// | ||
| + | it provides amd64 binaries of all current samba packages on actual | ||
| + | Debian and Ubuntu releases, - I spent quite some time to ensure it | ||
| + | all works fine on different environments and the original debian | ||
| + | packages can be built on older debian releases and on various | ||
| + | ubuntu releases. | ||
| + | is kinda trivial to fix. My repository happens to become quite | ||
| + | popular | ||
| + | turned it off for 5 minutes for a reboot, and amount of questions | ||
| + | I received after the Jul-23 windows update), - so something like | ||
| + | this is needed (or was, anyway, for older releases). | ||
| + | |||
| + | Buster and bullseye versions of samba are not supported. | ||
| + | don't use band-aid on a dead horse."// | ||
| + | ++++ | ||
| + | |||
| + | ++++ Alternativ: Pakete von sernet | ||
| wget https:// | wget https:// | ||
| dpkg -i sernet-samba-keyring_1.4_all.deb | dpkg -i sernet-samba-keyring_1.4_all.deb | ||
| Zeile 39: | Zeile 108: | ||
| aptitude search sernet | aptitude search sernet | ||
| apt-get install sernet-samba-ad | apt-get install sernet-samba-ad | ||
| - | )) | + | ++++ |
| + | ===== Dienste stoppen ===== | ||
| - | | + | |
| - | service | + | |
| - | service | + | |
| - | service | + | |
| - | | + | |
| | | ||
| mv / | mv / | ||
| Zeile 53: | Zeile 122: | ||
| Übersicht über '' | Übersicht über '' | ||
| samba-tool | samba-tool | ||
| - | samba-tool domain provision --help | + | samba-tool domain provision --help |
| - | samba-tool domain provision --use-rfc2307 | + | samba-tool domain provision --domain kurs --realm kurs.linuxhotel.de --adminpass v0gelsang, |
| + | oder | ||
| + | samba-tool domain provision | ||
| (( | (( | ||
| oder: | oder: | ||
| - | samba-tool domain provision --use-xattrs=yes | + | samba-tool domain provision |
| + | Alternative zu --use-xattrs=yes siehe https:// | ||
| )) | )) | ||
| ((bei Problemen, z.B. Passwort zu einfach: | ((bei Problemen, z.B. Passwort zu einfach: | ||
| rm / | rm / | ||
| - | )) | ||
| - | (( Alternative zu --use-xattrs=yes siehe https:// | ||
| )) | )) | ||
| Realm: KURS.LINUXHOTEL.DE | Realm: KURS.LINUXHOTEL.DE | ||
| Zeile 93: | Zeile 163: | ||
| testparm | testparm | ||
| - | | + | |
| - | | + | |
| - | service | + | |
| - | Offene Ports checken: | + | Optional, zum debuggen: |
| - | | + | |
| + | ===== testen ===== | ||
| + | Offene Ports checken:(( | ||
| + | ^ Service ^ Port ^ Protocol ^ | ||
| + | | DNS | 53 | tcp/udp | | ||
| + | | Kerberos | ||
| + | | ntp | 123 | udp | | ||
| + | | End Point Mapper (DCE/RPC Locator Service) | ||
| + | | NetBIOS Name Service | ||
| + | | NetBIOS Datagram | ||
| + | | NetBIOS Session | ||
| + | | LDAP | 389 | tcp/udp | | ||
| + | | SMB over TCP | 445 | tcp | | ||
| + | | Kerberos kpasswd | ||
| + | | LDAPS | 636 | tcp | | ||
| + | | Global Catalog | ||
| + | | Global Catalog SSL | 3269 | tcp | | ||
| + | | Dynamic RPC Ports | 49152-65535 | ||
| + | )) | ||
| + | lsof -Pi : | ||
| DNS testen: | DNS testen: | ||
| dig _ldap._tcp.kurs.linuxhotel.de SRV | dig _ldap._tcp.kurs.linuxhotel.de SRV | ||
| + | dig _kerberos._tcp.kurs.linuxhotel.de SRV | ||
| Benutzer anzeigen: | Benutzer anzeigen: | ||
| Zeile 108: | Zeile 197: | ||
| Kerberos testen: | Kerberos testen: | ||
| + | cp -b / | ||
| + | kinit Administrator | ||
| + | oder | ||
| kinit Administrator@KURS.LINUXHOTEL.DE | kinit Administrator@KURS.LINUXHOTEL.DE | ||
| klist | klist | ||
| Zeile 118: | Zeile 210: | ||
| LDAP testen: | LDAP testen: | ||
| - | |||
| - | ldbsearch -H / | ||
| <file txt ~/ | <file txt ~/ | ||
| Zeile 127: | Zeile 217: | ||
| TLS_REQCERT ALLOW | TLS_REQCERT ALLOW | ||
| </ | </ | ||
| + | ldapsearch -x -W | ||
| - | | + | |
| ===== Benutzer anlegen ===== | ===== Benutzer anlegen ===== | ||
| Zeile 142: | Zeile 233: | ||
| Benutzer anlegen: | Benutzer anlegen: | ||
| - | samba-tool user add heinz villa | + | samba-tool user add heinz |
| - | ===== NTP installieren ===== | ||
| - | siehe https:// | ||
| - | apt-get install ntp | ||
| - | cd / | ||
| - | chgrp ntp ntp_signd/ | ||
| - | ''/ | ||
| - | < | ||
| - | # By default, exchange time with everybody, but don't allow configuration. | ||
| - | restrict -4 default kod notrap nomodify nopeer noquery mssntp | ||
| - | restrict -6 default kod notrap nomodify nopeer noquery mssntp | ||
| - | ntpsigndsocket | ||
| - | </ | ||
| - | service ntp restart | ||
| - | watch ntpq -np | ||
| ===== Beitreten der Domäne mit Windows 7 ===== | ===== Beitreten der Domäne mit Windows 7 ===== | ||
| Zeile 171: | Zeile 248: | ||
| ===== Kerberos ===== | ===== Kerberos ===== | ||
| - | cat / | ||
| - | ln -s / | ||
| - | apt-get install krb5-user | ||
| kinit Administrator | kinit Administrator | ||
| kdestroy | kdestroy | ||
lpi2/samba-ad.1607697863.txt.gz · Zuletzt geändert: 2020/12/11 14:44 von ingo_wichmann
