allgemein:howto:samba_ad
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| allgemein:howto:samba_ad [08.12.2016 14:44] – richard | allgemein:howto:samba_ad [04.02.2025 12:09] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | https:// | + | ====== Samba 4 als Active Directory ====== |
| - | http://www.rebootrestore.com/ | + | Allgemeine Informationen zu Samba 4 als Acitve Directory bei: [[https://wiki.ubuntuusers.de/Archiv/ |
| - | https://www.packtpub.com/ | + | **HINWEIS: Die Seite ist noch nicht final überarbeitet worden. Sie wurde als Mitschrift während einer Schulung angefertigt. Es fehlen daher die Aufgabenstellungen, |
| + | während der Schulung vorgegeben wurden.** | ||
| - | https:// | + | ===== Buch-Empfehlung ===== |
| - | http://www.alvestrand.no/objectid/1.2.840.113556.1.8000.2554.html | + | Ein ausführliches Buch zu Samba 4 und dessen Möglichkeiten findet man in [[https://www.rheinwerk-verlag.de/samba-4_4186/|Rheinwerk-Verlag]] |
| + | **Achtung: | ||
| - | Buch-Empfehlung: | ||
| - | https:// | + | ===== Samba-Tools ===== |
| - | + | ||
| - | ====== Samba 4 als Active Directory ====== | + | |
| - | + | ||
| - | https:// | + | |
| - | + | ||
| - | ====== Samba-Tools | + | |
| ^Tool ^ Beschreibung^ | ^Tool ^ Beschreibung^ | ||
| - | |'' | + | |'' |
| - | |'' | + | |'' |
| |'' | |'' | ||
| |'' | |'' | ||
| |'' | |'' | ||
| - | |'' | + | |'' |
| - | |'' | + | |'' |
| |'' | |'' | ||
| - | |'' | + | |'' |
| |'' | |'' | ||
| |'' | |'' | ||
| Zeile 35: | Zeile 30: | ||
| |'' | |'' | ||
| |'' | |'' | ||
| - | |||
| ====== Installationsscript ====== | ====== Installationsscript ====== | ||
| - | <file bash smb.conf> | + | Die folgende Dateien können verwendet werden, um eine rudimentäre Konfiguartion vorzunehmen. |
| - | [global] | + | |
| - | + | ||
| - | workgroup = training | + | |
| - | netbios name = tsam-fs01 | + | |
| - | server string = Training CIFS Server | + | |
| - | server role = standalone server | + | |
| - | + | ||
| - | [Public] | + | |
| - | + | ||
| - | path = / | + | |
| - | comment = Dateifreigabe | + | |
| - | browseable = yes | + | |
| - | writeable = yes | + | |
| - | guest ok = yes | + | |
| - | + | ||
| - | [homes] | + | |
| - | comment = Heimatverzeichnis | + | |
| - | browseable = yes | + | |
| - | guest ok = yes | + | |
| - | writeable = yes | + | |
| - | valid users = %S | + | |
| - | # valid users = %S nur Eigentümer $S darf sich auf ein Home-Ordner verbinden | + | |
| - | </ | + | |
| <file python install_samba.py> | <file python install_samba.py> | ||
| # | # | ||
| Zeile 107: | Zeile 77: | ||
| # smbclient SMB-Client für Freigaben | # smbclient SMB-Client für Freigaben | ||
| # heimdal Kerberos Implementierung | # heimdal Kerberos Implementierung | ||
| - | os.system (" | + | os.system (" |
| os.system (" | os.system (" | ||
| os.system ("mv / | os.system ("mv / | ||
| Zeile 116: | Zeile 86: | ||
| | | ||
| </ | </ | ||
| + | |||
| + | Im vorangegangen Script wird eine erste '' | ||
| + | <file bash smb.conf> | ||
| + | [global] | ||
| + | |||
| + | workgroup = training | ||
| + | netbios name = tsam-fs01 | ||
| + | server string = Training CIFS Server | ||
| + | server role = standalone server | ||
| + | |||
| + | [Public] | ||
| + | |||
| + | path = / | ||
| + | comment = Dateifreigabe | ||
| + | browseable = yes | ||
| + | writeable = yes | ||
| + | guest ok = yes | ||
| + | | ||
| + | [homes] | ||
| + | comment = Heimatverzeichnis | ||
| + | browseable = yes | ||
| + | guest ok = yes | ||
| + | writeable = yes | ||
| + | valid users = %S | ||
| + | # valid users = %S nur Eigentümer $S darf sich auf ein Home-Ordner verbinden | ||
| + | </ | ||
| + | |||
| Zeile 526: | Zeile 523: | ||
| ====== Aufgabe 12: Wiederherstellung gelöschter Objekte (AD spezifisch) ====== | ====== Aufgabe 12: Wiederherstellung gelöschter Objekte (AD spezifisch) ====== | ||
| + | <file python enablerecyclebin> | ||
| + | # | ||
| + | # | ||
| + | # enabled the Recycle Bin optional feature | ||
| + | # | ||
| + | import optparse | ||
| + | import sys | ||
| - | ====== Kerberos ======= | + | # Find right directory when running from source tree |
| + | sys.path.insert(0, | ||
| + | |||
| + | import samba | ||
| + | from samba import getopt as options, Ldb | ||
| + | from ldb import SCOPE_BASE | ||
| + | import sys | ||
| + | import ldb | ||
| + | from samba.auth import system_session | ||
| + | |||
| + | parser | ||
| + | sambaopts | ||
| + | parser.add_option_group(sambaopts) | ||
| + | credopts | ||
| + | parser.add_option_group(credopts) | ||
| + | parser.add_option_group(options.VersionOptions(parser)) | ||
| + | |||
| + | opts, args = parser.parse_args() | ||
| + | opts.dump_all | ||
| + | |||
| + | if len(args) != 1: | ||
| + | parser.print_usage() | ||
| + | sys.exit(1) | ||
| + | |||
| + | url = args[0] | ||
| + | |||
| + | lp_ctx = sambaopts.get_loadparm() | ||
| + | |||
| + | creds = credopts.get_credentials(lp_ctx) | ||
| + | sam_ldb = Ldb(url, session_info=system_session(), | ||
| + | |||
| + | # get the rootDSE | ||
| + | res = sam_ldb.search(base="", | ||
| + | rootDse = res[0] | ||
| + | |||
| + | configbase=rootDse[" | ||
| + | |||
| + | # enable the feature | ||
| + | msg = ldb.Message() | ||
| + | msg.dn = ldb.Dn(sam_ldb, | ||
| + | msg[" | ||
| + | " | ||
| + | | ||
| + | res = sam_ldb.modify(msg) | ||
| + | |||
| + | print " | ||
| + | |||
| + | </ | ||
| + | ====== Aufgabe 14: Kerberos ======= | ||
| Kerberos Folien | Kerberos Folien | ||
| Zeile 548: | Zeile 600: | ||
| - Möchte der User einen zweiten Dienst nutzen, dann muss er für diesen ein neues ST beim TGS holen | - Möchte der User einen zweiten Dienst nutzen, dann muss er für diesen ein neues ST beim TGS holen | ||
| - | ====== Linux-Konfiguration ===== | + | ===== Linux-Konfiguration ===== |
| < | < | ||
allgemein/howto/samba_ad.1481208279.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
