Debian 9: How to set up Samba-Exchange between QEMU-Host and QEMU-Guest (Windows)?
The solution for /etc/samba/smb.conf
was way more simple than I expected before:
[global]
workgroup = WORKGROUP
security = user
map to guest = Bad User
server string = %h server (Samba, Ubuntu)
dns proxy = No
wins support = Yes
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
[Shared]
comment = Shared Folder for QEMU
path = /home/myusername/Exchange
public = no
browseable = yes
writeable = yes
read only = no
guest ok = yes
force user = myusername
Modify the file
/etc/samba/smb.conf
depending on your needs. In my case (Debian 9), just add the previous lines below the last existent line of the file.Restart
Samba
via terminal:/etc/init.d/samba restart
Mount the now configured shared folder in Windows via "Map Network Drive" --> et voila!
Related videos on Youtube
Dave
Updated on September 18, 2022Comments
-
Dave almost 2 years
I want to share a folder on my Debian-host with a Windows-guest. To run the necessary
Samba
-server I installed the following packages on my host:samba
samba-client
All I know right now is that I only need to add some additional lines with the correct input parameters to the file
/etc/samba/smb.conf
. I access the guest-VM viavirt-manager
. Now I found a few notes which state thatvirt-manager
can configure the/etc/samba/smb.conf
-file automatically.
Unfortunately I am not sure which command(s) I have to use.
Here is one command with
-net user,smb=/absolute/path/to/folder \
, but I get the error "Command not found".Would it end in the same way like adapting the
/etc/samba/smb.conf
-file by myself?- What do I have to type in this file at least?
- Which permissions does the exchange-folder require?
- How do I have to configure the Windows-guest for getting access to the mentioned folder (Windows-network is already working)?
Here is an example for the additional section in
/etc/samba/smb.conf
:[qemu] path = /home/user/exchange comment = my shared folder guest ok = Yes inherit acls = Yes read only = No browseable = Yes