Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
|
admin_grundlagen:samba [2020/01/31 14:56] ingo_wichmann [Samba starten] |
admin_grundlagen:samba [2024/04/26 11:01] (aktuell) |
||
|---|---|---|---|
| Zeile 4: | Zeile 4: | ||
| ===== Benötigte Pakete ===== | ===== Benötigte Pakete ===== | ||
| Debian, Ubuntu: | Debian, Ubuntu: | ||
| - | apt-get install samba smbclient samba-common-bin | + | apt install samba smbclient samba-common-bin |
| ((neuere Versionen manchmal in [[https://packages.debian.org/jessie/samba|Backports]])) | ((neuere Versionen manchmal in [[https://packages.debian.org/jessie/samba|Backports]])) | ||
| Zeile 40: | Zeile 40: | ||
| )) | )) | ||
| ===== Samba starten ===== | ===== Samba starten ===== | ||
| - | |||
| - | SuSE, Centos (ab 6): | ||
| - | chkconfig smb on | ||
| - | chkconfig nmb on | ||
| - | service smb start | ||
| - | service nmb start | ||
| SuSE (ab 14), Centos (ab 7): | SuSE (ab 14), Centos (ab 7): | ||
| systemctl enable --now smb.service | systemctl enable --now smb.service | ||
| systemctl enable --now nmb.service | systemctl enable --now nmb.service | ||
| - | | ||
| - | Debian (bis 7): | ||
| - | service samba restart | ||
| Ubuntu (ab 14.04), Debian (ab 8): | Ubuntu (ab 14.04), Debian (ab 8): | ||
| Zeile 58: | Zeile 49: | ||
| service nmbd restart | service nmbd restart | ||
| ===== Benutzer anlegen ===== | ===== Benutzer anlegen ===== | ||
| + | Erst Unix-Nutzer: | ||
| useradd -m iw | useradd -m iw | ||
| + | |||
| + | Dann Windows-Attribute hinzufügen: | ||
| smbpasswd -a iw | smbpasswd -a iw | ||
| + | oder | ||
| + | pdbedit -a -u iw | ||
| ===== Testen ===== | ===== Testen ===== | ||
| smbclient -N -L localhost | smbclient -N -L localhost | ||
| smbclient //notebook17/freigabe -U iw | smbclient //notebook17/freigabe -U iw | ||
| - | (( Unter Debian 6.0 und vmware player 4.0.2 tauchten Probleme beim Zugriff von der VM mit Windows XP auf den Samba Server auf. Durch folgenden Eintrag konnten wir den Fehler reproduzieren: | ||
| - | ''/etc/samba/smb.conf'' : | ||
| - | <file> | ||
| - | interfaces = vmnet08 | ||
| - | bind interfaces only = yes | ||
| - | </file> | ||
| - | ''/var/log/samba/log.nmbd'' | ||
| - | <file> | ||
| - | [2012/02/17 09:10:26.164668, 0] lib/interface.c:542(load_interfaces) | ||
| - | WARNING: no network interfaces found | ||
| - | </file> | ||
| - | Scheinbar kommt Samba mit den VMware Interfaces nicht klar. Lösung: | ||
| - | <file> | ||
| - | interfaces = 192.168.197.0/24 | ||
| - | bind interfaces only = yes | ||
| - | </file> | ||
| - | )) | ||
| ==== Samba Freigabe mounten ==== | ==== Samba Freigabe mounten ==== | ||
| Zeile 147: | Zeile 126: | ||
| </file> | </file> | ||
| + | Logmeldungen für eine Verbindung: | ||
| + | smbstatus | ||
| + | -> PID der Verbindung raussuchen | ||
| + | smbcontrol $PID debug 3 | ||
| ===== Auf Netzwerkebene lauschen ===== | ===== Auf Netzwerkebene lauschen ===== | ||