Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
server_und_serverdienste:openldap_mit_samba_als_pdc_neues_backend [2017/12/11 22:54] – [LDAP mit SAMBA als PDC] boospy | server_und_serverdienste:openldap_mit_samba_als_pdc_neues_backend [2021/03/04 15:53] (aktuell) – lois | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== OpenLDAP mit Samba als PDC (neues backend) ====== | ====== OpenLDAP mit Samba als PDC (neues backend) ====== | ||
{{: | {{: | ||
+ | |||
+ | Hauseigenes Apt-Repo: [[https:// | ||
+ | \\ | ||
+ | \\ | ||
===== Grundinformation ===== | ===== Grundinformation ===== | ||
- | __Verwendetes System: Debian 6.0__ | + | __Verwendetes System: Debian 6.0, Debian 9.3 und Ubuntu 16.04.3__ |
+ | |||
+ | **Wichtige INFO:** 12.2017 \\ | ||
+ | Ich hab Freigabeeinstellungen auf Debian 9.3 (Samba Version 4.5.12) und Ubuntu 16.04.3 (Samba Version 4.3.11) getestet. Anscheindend ist die Sambaversion von Ubuntu Schrott. Kopiert schreibend gerade mal mit 35 bis 65MB/s. Bei Debian, gleich Config kopierte ich schreibend mit 115MB/s. Das ganze gilt auf der virtualsierten Ebene von Proxmox. Ubuntu ist als LXC (lokales ZFS) oder Ubuntu mit KVM gleich langsam. Ubuntu auf eine PHY Maschine funktioniert mit den gleichen spezifikationen super schnell. Debian hingeben ist überall supernschell, | ||
+ | |||
+ | Daran sollte man denken. Ich habe Samba und LDAP auf einem Ubuntuserver laufen. Die Freigaben sind aber auf einem Debian. Ist mit LXC ja kein Problem. | ||
Seit Version 2.4 arbeitet [[http:// | Seit Version 2.4 arbeitet [[http:// | ||
Zeile 514: | Zeile 523: | ||
===== LDAP mit SAMBA als PDC ===== | ===== LDAP mit SAMBA als PDC ===== | ||
+ | |||
+ | Um die Config von Samba neu einzulesen wird davon abegraten Samba neu zu starten, da das Protokoll sehr lange braucht um wieder vollwertig verfügbar zu sein, immerhin wird das ganze Netzwerk gescannt und der Cache befüllt. Die Config kann man mit folgendem Befehl neu einlesen: '' | ||
+ | |||
Als ersters übergeben wir Samba das LDAPpasswort. Dies wird verschlüsselt in einer Datenbankfile gespeichert. | Als ersters übergeben wir Samba das LDAPpasswort. Dies wird verschlüsselt in einer Datenbankfile gespeichert. | ||
< | < | ||
Zeile 538: | Zeile 550: | ||
Beispiel: | Beispiel: | ||
- | < | + | < |
############################ | ############################ | ||
# Credential Configuration # | # Credential Configuration # | ||
Zeile 779: | Zeile 791: | ||
</ | </ | ||
+ | <file bash smb.conf> | ||
+ | [global] | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | load printers = no | ||
+ | |||
+ | log level = 1 | ||
+ | log file = / | ||
+ | max log size = 50 | ||
+ | |||
+ | | ||
+ | |||
+ | ldap admin dn = cn=admin, | ||
+ | ldap passwd sync = yes | ||
+ | ldap machine suffix = ou=machines, | ||
+ | ldap User suffix = ou=users, | ||
+ | ldap Group Suffix = ou=windowsusergroups, | ||
+ | ldap suffix = dc=darkwolf, | ||
+ | ldap ssl = off | ||
+ | |||
+ | tls enabled | ||
+ | idmap config * : range = 10000-40000 | ||
+ | |||
+ | add user script = / | ||
+ | add machine script = / | ||
+ | |||
+ | add group script = / | ||
+ | add user to group script = / | ||
+ | | ||
+ | set primary group script = / | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | local master = yes | ||
+ | os level = 200 | ||
+ | | ||
+ | | ||
+ | | ||
+ | wins support = yes | ||
+ | dns proxy = no | ||
+ | |||
+ | logon path = \\%N\profiles\%U | ||
+ | |||
+ | # | ||
+ | [netlogon] | ||
+ | | ||
+ | path = / | ||
+ | guest ok = yes | ||
+ | | ||
+ | write list = root | ||
+ | |||
+ | |||
+ | [profiles] | ||
+ | path = / | ||
+ | | ||
+ | | ||
+ | read only = No | ||
+ | force create mode = 0600 | ||
+ | force directory mode = 0700 | ||
+ | csc policy = disable | ||
+ | store dos attributes = yes | ||
+ | vfs objects = acl_xattr | ||
+ | |||
+ | |||
+ | [homes] | ||
+ | path = /home/%U | ||
+ | | ||
+ | valid users = %S | ||
+ | read only = no | ||
+ | | ||
+ | | ||
+ | |||
+ | [public] | ||
+ | | ||
+ | path = / | ||
+ | | ||
+ | | ||
+ | | ||
+ | write list = @ldapbenutzer | ||
+ | |||
+ | |||
+ | [printers] | ||
+ | | ||
+ | | ||
+ | path = / | ||
+ | | ||
+ | guest ok = no | ||
+ | read only = yes | ||
+ | | ||
+ | |||
+ | [print$] | ||
+ | | ||
+ | path = / | ||
+ | | ||
+ | read only = yes | ||
+ | guest ok = no | ||
+ | </ | ||
< | < | ||
smbldap-populate | smbldap-populate | ||
Zeile 791: | Zeile 906: | ||
</ | </ | ||
+ | ==== Sambadomäne mit Linuxclient beitreten ==== | ||
+ | Vorausetztung ist natürlich das der Client bereits am LDAP-Server hängt. Für die Anbindung an die Sambadomäne muss man Samba installieren und konfigurieren. Hier eine Minimalconfig mit 2 Freigaben. | ||
+ | <file bash smb.conf> | ||
+ | [global] | ||
+ | | ||
+ | | ||
+ | dns proxy = no | ||
+ | | ||
+ | log file = / | ||
+ | max log size = 1000 | ||
+ | panic action = / | ||
+ | | ||
+ | | ||
+ | obey pam restrictions = yes | ||
+ | unix password sync = yes | ||
+ | | ||
+ | | ||
+ | pam password change = yes | ||
+ | map to guest = bad user | ||
+ | | ||
+ | # | ||
+ | |||
+ | [homes] | ||
+ | path = /home/%U | ||
+ | | ||
+ | valid users = %S | ||
+ | read only = no | ||
+ | | ||
+ | | ||
+ | |||
+ | [public] | ||
+ | | ||
+ | path = / | ||
+ | | ||
+ | | ||
+ | | ||
+ | write list = @ldapbenutzer | ||
+ | </ | ||
+ | Lokalen Rootgenutzer zu Samba hinzufügen. Kann man, muss man aber unter normalen Umständen nicht. | ||
+ | < | ||
+ | smbpasswd -a root | ||
+ | </ | ||
+ | Beitreten einer Domäne: | ||
+ | < | ||
+ | net rpc join | ||
+ | </ | ||
+ | Danach kann das ganze noch überprüfen: | ||
+ | < | ||
+ | net rpc info | ||
+ | net getdomainsid | ||
+ | smbclient -L /localhost | ||
+ | </ |