# How to connect to Samba Server?



## roblox43 (Mar 7, 2020)

Hey guys,

*(running freebsd 12.1, samba48)* I have initiated a samba server, with the smb4.conf and the rc.conf file having `samba_server_enable = "YES"` line at the bottom. I am running FreeBSD off a virtual machine, and it has an inet address of 10.0.2.15 (checked using ifconfig). In the smb4.conf file I have set the hosts allow line to "10.0.2." to allow all subnets to connect to the server. When i run `service samba_server start` it tells me that
`samba_server_enable was not found in /etc/rc.conf`, even though I have checked that the line is there.

So i started the server using onestart instead of start and it says
`Samba name server FREEBSD is now a local master browser for workgroup WORKGROUP on subnet 10.0.2.15`

When i run "\\10.0.2.15" in the windows 10 run dialog box it doesn't connect, can anybody tell me why this would be? If you need me to post any extra information let me know and I will respond ASAP


----------



## Zvoni (Mar 7, 2020)

What's in the logs?


----------



## Emrion (Mar 7, 2020)

I think you are in NAT network mode for your Virtual Machine. So, you aren't in the same subnet than your Windows box. Samba won't work this way for the best I know.

In your VM network settings, select "Bridged adapter".

By the way, samba48 is End of Life since december 2019. You should use samba410.


----------



## driesm (Mar 7, 2020)

roblox43 said:


> `samba_server_enable = "YES"`



Remove the spaces.

`samba_server_enable="YES"`


----------



## roblox43 (Mar 7, 2020)

Emrion said:


> I think your are in NAT network mode for your Virtual Machine. So, you aren't in the same subnet than your Windows box. Samba won't work this way for the best I know.
> 
> In your VM network settings, select "Bridged adapter".
> 
> By the way, samba48 is End of Life since december 2019. You should use samba410.


This did the trick. The subnet difference is something i shouldve thought of before since my local machine is 192.168. anyway. Thank you! Oh I had no idea 410 was the later version. I assumed 48 was newer just because its a higher number.


----------



## roblox43 (Mar 7, 2020)

Zvoni said:


> What's in the logs?


Its been resolved, see Emrion's response for the fix. I actually haven't specified a log file in the smb4.conf file i should probably do that.


----------



## Emrion (Mar 7, 2020)

roblox43 said:


> This did the trick. The subnet difference is something i shouldve thought of before since my local machine is 192.168. anyway. Thank you! Oh I had no idea 410 was the later version. I assumed 48 was newer just because its a higher number.


4.10 > 4.08


----------

