Vorraussetzung: Netzwerk
Debian, Ubuntu:
apt-get install samba smbclient samba-common-bin
SuSE:
zypper install samba samba-client
Fedora / Centos :
yum install samba samba-client
[global] … workgroup = kurs … [freigabe] path = /tmp writable = yes …
Überprüfen: 3)
testparm
SuSE (ab 14), Centos (ab 7):
systemctl enable --now smb.service systemctl enable --now nmb.service
Ubuntu (ab 14.04), Debian (ab 8):
service smbd restart service nmbd restart
useradd -m iw smbpasswd -a iw
smbclient -N -L localhost smbclient //notebook17/freigabe -U iw
Pakete:
cifs-utils
( Debian (ab 6.0), CentOS (ab 7) )
mkdir /mnt/freigabe mount -t cifs -o username=xxx,uid=localuser,gid=localgroup //notebook17/freigabe /mnt/freigabe
testparm
Ausgabe von testparm:
Loaded services file OK. Server role: ROLE_STANDALONE
netstat -tulpn | grep nmbd netstat -tulpn | grep smbd
oder
lsof -ai -c smbd -P lsof -ai -c nmbd -P
nmblookup -M kurs
getent passwd benutzername
pdbedit -L -v benutzername
Ausgabe von pdbedit:
Unix username: benutzername .. Account Flags: [U ]
smbclient -L localhost -U benutzername
Hier sollten die Freigaben des Servers angezeigt werden.
smbclient //rechnername/freigabe -U benutzername
Anzahl der Logmeldungen erhöhen:
smbcontrol smbd debug 2 smbcontrol nmbd debug 2
Logmeldungen besser finden:
[global] log file = /var/log/samba/log.%m
wireshark
z.B. Broadcast vom Typ Browser. Server Type checken ( „Microsoft Windows Browser Protocol“ → „Server Type“ )
yast -i samba samba-clientinstallieren
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
kann man ignorieren, siehe http://bugs.debian.org/608624 ERROR: pid directory /var/run/samba does not exist
kann man auch ignorieren. Das fehlende Verzeichnis wird beim ersten Start von Samba angelegt.
testparm -v
/etc/samba/smb.conf
:
interfaces = vmnet08 bind interfaces only = yes
/var/log/samba/log.nmbd
[2012/02/17 09:10:26.164668, 0] lib/interface.c:542(load_interfaces) WARNING: no network interfaces foundScheinbar kommt Samba mit den VMware Interfaces nicht klar. Lösung:
interfaces = 192.168.197.0/24 bind interfaces only = yes