Hallo TomL,
vielen Dank für Deine große Mühe! Ich habe stundenlang Texte gewälzt, aber nirgendwo eine für mich verständliche Anleitung finden können.
Es gibt ein paar Autoren, die auf komplexe Problemfälle hinweisen:
Drilling, Thomas: Flotter Tanz. Windows 8 und Linux im Netz. S. 118-125 in: Ubuntu Spezial 01/2014
Eßler, Hans-Georg: Mittlere Reife. Besser oder schlechter? Windows 10 in der Linux-Praxis. S. 40-44 in: Ubuntu Spezial 02/2016.
Kißling, Kristian: Gestatten, Windows! Angenehm, Linux. Dateien tauschen zwischen Windows und Linux. S. 44-47 in Easy Linux 03/2008.
Amberg, Eric: Netzwerk im Gleichschritt. Zentrale Dienste im Windows-Netzwerk mit Samba. S. 18-25 in Linux-User Sonderheft 01/2009.
So manches scheint sich mit den verschiedenen Windows-Versionen verändert zu haben. Mir ist nicht klar geworden, inwieweit sich die bei W10 übliche "vierstellige Geheimzahl" (Eßer 2016: 40) auf das Postulat gleicher Passworte auswirkt. Die Heimnetzgruppen (Drilling 2014: 118, 121-122) in Windows 8 tauchen in dieser Form in W10 nicht mehr auf, soweit ich das überblicke.
Dennoch taucht in den "Basisinformationen" wieder die Arbeitsgruppe WORKGROUP auf.
![2191](https://debianforum.de/forum/app.php/gallery/image/2191/mini)
Drilling (2014: 121) erinnert noch einmal an erforderliche oder optionale Pakete, u.a. cifs-vfs, samba-tools, smbfs. smbfs ist durch cifs-utils ersetzt worden. Samba-Tools scheint auch obsolet zu sein.
Deinem ersten Arbeitsschritt bin ich nun so gefolgt:
Code: Alles auswählen
root@Z390M:~# systemctl stop smbd nmbd
root@Z390M:~# smbpasswd -a martin
New SMB password:
Retype new SMB password:
Added user martin.
root@Z390M:~# addgroup sambauser
Lege Gruppe »sambauser« (GID 1003) an ...
Fertig.
root@Z390M:~# adduser martin sambauser
Füge Benutzer »martin« der Gruppe »sambauser« hinzu ...
Benutzer martin wird zur Gruppe sambauser hinzugefügt.
Fertig.
root@Z390M:~# pdbedit -L
martin:1000:Martin Xxxxxxxxxxxx
root@Z390M:~# chown root:sambauser /media/Linuxdaten-2/25-VM-virtshare
root@Z390M:~# chmod 770 /media/Linuxdaten-2/25-VM-virtshare
root@Z390M:~# ls /media/Linuxdaten-2 | grep 25-VM-virtshare
25-VM-virtshare
root@Z390M:~# ls /media/Linuxdaten-2 | grep 25-VM-virtshare
25-VM-virtshare
root@Z390M:~# echo "Dies ist eine Testdatei" >/media/Linuxdaten-2/25-VM-virtshare/Testdatei
root@Z390M:~# mv /etc/samba/smb.conf /etc/samba/smb.conf.alt
root@Z390M:~# touch /etc/samba/smb.conf
root@Z390M:~# nano /etc/samba/smb.conf
root@Z390M:~# testparm
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
idmap config * : backend = tdb
root@Z390M:~#
root@Z390M:~# systemctl status smbd nmbd
● smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-07-18 13:08:21 CEST; 12s ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 10665 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
Main PID: 10675 (smbd)
Status: "smbd: ready to serve connections..."
Tasks: 4 (limit: 4915)
Memory: 7.9M
CGroup: /system.slice/smbd.service
├─10675 /usr/sbin/smbd --foreground --no-process-group
├─10677 /usr/sbin/smbd --foreground --no-process-group
├─10678 /usr/sbin/smbd --foreground --no-process-group
└─10679 /usr/sbin/smbd --foreground --no-process-group
Jul 18 13:08:21 Z390M systemd[1]: Starting Samba SMB Daemon...
Jul 18 13:08:21 Z390M smbd[10675]: [2019/07/18 13:08:21.819849, 0] ../lib/util/become_daemon.c:138(daemon_ready)
Jul 18 13:08:21 Z390M smbd[10675]: daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve connections
Jul 18 13:08:21 Z390M systemd[1]: Started Samba SMB Daemon.
● nmbd.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-07-18 13:08:21 CEST; 12s ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 10668 (nmbd)
Status: "nmbd: ready to serve connections..."
Tasks: 1 (limit: 4915)
Memory: 2.5M
CGroup: /system.slice/nmbd.service
└─10668 /usr/sbin/nmbd --foreground --no-process-group
Jul 18 13:08:21 Z390M systemd[1]: Starting Samba NMB Daemon...
Jul 18 13:08:21 Z390M nmbd[10668]: [2019/07/18 13:08:21.759733, 0] ../lib/util/become_daemon.c:138(daemon_ready)
Jul 18 13:08:21 Z390M nmbd[10668]: daemon_ready: STATUS=daemon 'nmbd' finished starting up and ready to serve connections
Jul 18 13:08:21 Z390M systemd[1]: Started Samba NMB Daemon.
lines 9-39/39 (END)
Verstehe ich das richtig, dass mit "chmod 770" der root über alleinige Rechte Freigabeordners verfügt? Ich habe nämlich als User keinen Zugriff mehr darauf und konnte deshalt die Testdateien nicht überprüfen.
Beim Befehl
habe ich etwas falsch gemacht?
Dann die /etc/samba/smb.conf
Code: Alles auswählen
# smb.conf
# Date : 16.11.2018
# Version: 1.0
#============================================================
[global]
# hosts allow = 192.168.1.0/24 localhost
workgroup = WORKGROUP
server string = %h server
server role = standalone server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
panic action = /usr/share/samba/panic-action %d
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = no
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = no
map to guest = bad user
usershare allow guests = no
invalid users = root
#======================= Share Definitions =======================
[Daten]
path=/media/Linuxdaten-2/25-VM-virtshare
writeable = yes
browseable = yes
guest ok = no
write list = @sambauser
valid users = @sambauser
force user = martin
force group = sambauser
create mask = 0770
force create mode = 0660
directory mask = 0770
force directory mode = 0770
#[ZweitesDir]
#path=/media/ZweitesDir
#writeable = yes
#browseable = yes
#guest ok = no
#write list = @sambauser
#valid users = @sambauser
#force user = martin
#force group = sambauser
#create mask = 0770
#directory mask = 0770
#force create mode = 0660
#force directory mode = 0770
#=============================================================
#EOF
Leider wollen mir dann die Zugriffe nicht gelingen.
Linux:
Code: Alles auswählen
root@X1:~# mkdir /media/Linuxdaten/25-VM-virtshare
root@X1:~# mount //192.168.1.152/25-VM-virtshare /media/Linuxdaten/25-VM-virtshare -t cifs -o defaults.username=martin
Password for root@//192.168.1.152/25-VM-virtshare: **********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@X1:~#
W10: Habe ich bei den Passwörtern dasjenige vom Samba-User eingegeben. Das stimmt doch, oder?
Code: Alles auswählen
Microsoft Windows [Version 10.0.18362.239]
(c) 2019 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\herrn>net use x: \\192.168.1.152\media/Linuxdaten-2/25-VM-virtshare [i]Password[/i] /user:martin /persistent:yes
Systemfehler 53 aufgetreten.
Der Netzwerkpfad wurde nicht gefunden.
C:\Users\herrn>
Microsoft Windows [Version 10.0.18362.239]
(c) 2019 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\herrn>net use x: \\192.168.1.152\media\Linuxdaten-2\25-VM-virtshare [i]Password[/i] /user:martin /persistent:yes
Systemfehler 53 aufgetreten.
Der Netzwerkpfad wurde nicht gefunden.
C:\Users\herrn>
Gruß
Marind