Failed to use Samba Shared folder

https://docs.fedoraproject.org/en-US/quick-docs/samba/

i followed this article first but didn’t work, tried to disable SElinux but nothing happed
, I was using Pop os and few days ago i Replaced with fedora,
these settings was working on Pop, but i have no idea why they are not working here.

I’m Using Virt Manager to Run Windows 10 Guest machine

[global]
	dns proxy = No
	map to guest = Bad User
	panic action = /usr/share/samba/panic-action %d
	security = USER
	server string = %h server (Samba, Fedora)
	usershare allow guests = Yes
	wins support = Yes
	workgroup = HOME
	idmap config * : backend = tdb
	hosts allow = 127.0.0.1 192.168.122.1/24
	hosts deny = 0.0.0.0/0


[homes]
	browseable = No
	comment = Home Directories
	inherit acls = Yes
	read only = No
	valid users = %S %D%w%S


[printers]
	browseable = No
	comment = All Printers
	create mask = 0600
	path = /var/tmp
	printable = Yes


[print$]
	comment = Printer Drivers
	create mask = 0664
	directory mask = 0775
	force group = @printadmin
	path = /var/lib/samba/drivers
	write list = @printadmin root


[share]
	comment = Host SAMBA Server for VM
	create mask = 0777
	directory mask = 0777
	force group = jawad
	force user = jawad
	guest ok = Yes
	path = /home/jawad/share
	read only = No

And Journalctl -f output when restarting smb and nmb

Nov 08 20:16:43 fedora systemd[1]: smb.service: Got notification message from PID 19087, but reception only permitted for main PID 19083
Nov 08 20:17:06 fedora nmbd[19080]: [2021/11/08 20:17:06.469294,  0] ../../source3/nmbd/nmbd_become_lmb.c:398(become_local_master_stage2)
Nov 08 20:17:06 fedora nmbd[19080]:   *****
Nov 08 20:17:06 fedora nmbd[19080]:
Nov 08 20:17:06 fedora nmbd[19080]:   Samba name server FEDORA is now a local master browser for workgroup HOME on subnet 192.168.1.102
Nov 08 20:17:06 fedora nmbd[19080]:
Nov 08 20:17:06 fedora nmbd[19080]:   *****
Nov 08 20:17:06 fedora nmbd[19080]: [2021/11/08 20:17:06.469821,  0] ../../source3/nmbd/nmbd_become_lmb.c:398(become_local_master_stage2)
Nov 08 20:17:06 fedora nmbd[19080]:   *****
Nov 08 20:17:06 fedora nmbd[19080]:
Nov 08 20:17:06 fedora nmbd[19080]:   Samba name server FEDORA is now a local master browser for workgroup HOME on subnet 192.168.122.1
Nov 08 20:17:06 fedora nmbd[19080]:
Nov 08 20:17:06 fedora nmbd[19080]:   *****
Nov 08 20:17:06 fedora nmbd[19080]: [2021/11/08 20:17:06.470489,  0] ../../source3/nmbd/nmbd_browsesync.c:355(find_domain_master_name_query_fail)
Nov 08 20:17:06 fedora nmbd[19080]:   find_domain_master_name_query_fail:
Nov 08 20:17:06 fedora nmbd[19080]:   Unable to find the Domain Master Browser name HOME<1b> for the workgroup HOME.
Nov 08 20:17:06 fedora nmbd[19080]:   Unable to sync browse lists in this workgroup.
Nov 08 20:17:06 fedora nmbd[19080]: [2021/11/08 20:17:06.470666,  0] ../../source3/nmbd/nmbd_browsesync.c:355(find_domain_master_name_query_fail)
Nov 08 20:17:06 fedora nmbd[19080]:   find_domain_master_name_query_fail:
Nov 08 20:17:06 fedora nmbd[19080]:   Unable to find the Domain Master Browser name HOME<1b> for the workgroup HOME.
Nov 08 20:17:06 fedora nmbd[19080]:   Unable to sync browse lists in this workgroup.
1 Like

Try: hosts allow = 127.0.0.1 192.168.122.0/24 >> if you want grant access to 192.168.122.1 - x.x.x.245, the whole range.

The .0 on the IP-address indicates the Network and /24 (255.255.255.0) the sub-net.

Still the same
i think Samba Server Is working but Windows Can’t Connect to it for some reason
Tried to connect to Samba through Nautilus from the same system and it worked
Windows Saying \192.168.122.1\ Is there but Can’t connect Maybe because a firewall blocking it
i configured SElinux also tried to set it to Premissive but nothing changed

hosts allow = 127.0.0.1 192.168.122.0/24 192.168.1.0/24

Try to to add both sub-nets to host allowed (192.168.122.0/24 192.168.1.0/24).

By the way, Samba is installed on the host F35, right ? And you want to access with Win10 where is a guest on libvirt (Redirect Notice) ?

If, after the change you still have problems, you need to give us information’s as:

  1. ifconfig from the host where vitalization runs
  2. ipconfig -a from the window10 guest
  3. and from the virtualization virsh list -all

Still Can’t connect

By the way, Samba is installed on the host F35, right ? And you want to access with Win10 where is a guest on libvirt (Getting started with virtualization :: Fedora Docs ) ?

Yes that’s what i’m trying to do

jawad@fedora ~> ifconfig
enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 3c:2c:30:cc:54:73  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4301  bytes 564756 (551.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4301  bytes 564756 (551.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:91:1c:1d  txqueuelen 1000  (Ethernet)
        RX packets 137001  bytes 11789925 (11.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 182901  bytes 243633225 (232.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::fc54:ff:fed1:bb5c  prefixlen 64  scopeid 0x20<link>
        ether fe:54:00:d1:bb:5c  txqueuelen 1000  (Ethernet)
        RX packets 1651  bytes 477187 (466.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1711  bytes 897382 (876.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.102  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::a18a:62e2:ea71:91d9  prefixlen 64  scopeid 0x20<link>
        ether 48:a4:72:56:e0:0f  txqueuelen 1000  (Ethernet)
        RX packets 1018907  bytes 1232687185 (1.1 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 720400  bytes 88866307 (84.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

C:\Users\Win>ipconfig

Windows IP Configuration


Ethernet adapter Ethernet Instance 0:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::e175:d86f:26ac:e468%5
   IPv4 Address. . . . . . . . . . . : 192.168.122.52
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.122.1

~> sudo virsh list --all
[sudo] password for jawad:
 Id   Name    State
-----------------------
 1    win10   running

check this on windows:

sudo firewall-cmd --permanent --zone=libvirt --add-service=samba
sudo firewall-cmd --reload
3 Likes

Finally it’s working.
I’ve run these commands before following The wiki Article but now when i run them again it’s working.
Thanks

1 Like