Why can't the Windows clients see my FreeBSD machine?

I'm trying to share a couple of folders through samba. Basically share a couple folders of movies and tv shows. I followed this
https://vermaden.wordpress.com/2018/12/27/smb-cifs-on-freebsd/
I followed to almost the very letter and the biggest issue I'm having right now, after rebooting my system over and over again, the Windows clients are not able to see the system; even after putting in the IP address.

Code:
[global]
workgroup = WORKGOUP
netbios name = albert
server string = samba
security = user
encrypt passwords = yes
max log size = 500
preferred master = yes
interfaces = em0
bind interfaces only = yes
socket options = TCP_NODELAY
strict locking = no
strict sync = no

[homes]
comment = User Home
browseable = no
writeable = yes
directory mask = 0700
create mask = 0700

[etc]
comment = Server Configuration
path = /etc
public = no
writeable = yes
write list = @admin
directory mask = 0770
create mask = 0770

[www]
comment = Web Root
path = /usr/local/www
public = no
writeable = yes
write list = @webadm
directory mask = 0775
create mask = 0775

[TV]
path = /media/TV-Series
valid users = shares
public = no
writable = yes
browsable = yes
guest ok = no
create mask = 0755
directory mask = 0755

[Movies]
path = /media/Movies
vaid users = shares
public = no
writable = yes
browsable = yes
guest ok = no
create mask = 0755
directory mask = 0755

This is my rc.conf
Code:
hostname="ALBERT"
ifconfig_re0="inet 192.168.1.10 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
linux_enable="YES"
kld_list="nvidia-modeset"
hald_enable="YES"
dbus_enable="YES"
samba_server_enable="YES"

What am I missing?
 
SirDice thanks for the info. I tried it.. Didn't work. I installed 'net/py-wsdd" and rebooted the system after editing the "/etc/rc.conf"
Everything is still the same. Not working.

Have to say, its rather annoying trying to figure this out; especially when I've done everything correctly.
 
Maybe you've done this already, but since you didn't mention it - did you check the basic network connectivity between the hosts first?

I.e. can you ping the samba host from your windows host?

Is samba really running, i.e. do you see the ports correctly bound in sockstat -4l? Does anything of interest show in the samba logs?
 
Screenshot_20220726_223331.png

Is samba really running, i.e. do you see the ports correctly bound in sockstat -4l? Does anything of interest show in the samba logs?
This is what my sockstat says. I've done everything to get samba running. I've done everything I could think of. Even rebooting the system. So what is the deal?
 
☝️

So you're saying Start, Run (Windows-R) and then \\192.168.1.10 does nothing?
I get an error, "Windows cannot locate \\192.168.1.10". It tells me to check the spelling of the name.
I ping the BSD system from the Windows command prompt and I get a reply. So that's OK.
The BSD system is actively having an internet connection. So all is good there. I'm writing this reply on it right now. I just don't understand what is the issue?
 
You seem to be facing some issue with samba. You're missing a smbd process on port 445 IMHO. Can't say why though.
Sorry for repeating myself here: you'll have to check the logs.
I recommend increasing log level to debug.
 
I just checked this..
/var/log/samba/log.smbd

Code:
[2022/07/26 23:12:21.269562,  0] ../../lib/param/loadparm.c:801(lpcfg_map_parameter)
  Unknown parameter encountered: "vaid users"
[2022/07/26 23:12:21.269745,  0] ../../lib/param/loadparm.c:1874(lpcfg_do_service_parameter)
  Ignoring unknown parameter "vaid users"
[2022/07/26 23:12:21.271318,  0] ../../source3/lib/interface.c:669(load_interfaces)
  WARNING: no network interfaces found
[2022/07/26 23:12:21.576520,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2022/07/26 23:12:21.586636,  0] ../../source3/smbd/server.c:1243(open_sockets_smbd)
  open_sockets_smbd: No sockets available to bind to.
[2022/07/26 23:12:21.587681,  0] ../../source3/lib/util.c:830(smb_panic_s3)
  PANIC (pid 1529): open_sockets_smbd() failed
[2022/07/26 23:12:21.588076,  0] ../../lib/util/fault.c:222(log_stack_trace)
  BACKTRACE:
   #0 log_stack_trace + 0x35 [ip=0x8010df5d5] [sp=0x7fffffffdea0]
   #1 smb_panic_s3 + 0x56 [ip=0x80173f5a6] [sp=0x7fffffffe770]
   #2 smb_panic + 0x17 [ip=0x8010df3c7] [sp=0x7fffffffe790]
   #3 smbd_exit_server + 0x3d5 [ip=0x8013e7375] [sp=0x7fffffffe7a0]
   #4 smbd_exit_server + 0x11 [ip=0x8013e6fb1] [sp=0x7fffffffe7f0]
   #5 <unknown symbol> [ip=0x8021cdbfc] [sp=0x7fffffffe800]
   #6 main + 0x1e9a [ip=0x1031a8a] [sp=0x7fffffffe810]
   #7 _start + 0xe2 [ip=0x102d3e2] [sp=0x7fffffffebf0]
   #8 <unknown symbol> [ip=0x80105b008] [sp=0x7fffffffec00]
[2022/07/26 23:12:21.736031,  0] ../../source3/lib/dumpcore.c:310(dump_core)
  unable to change to %N.core
  refusing to dump core
[2022/07/26 23:23:33.424556,  0] ../../lib/param/loadparm.c:801(lpcfg_map_parameter)
  Unknown parameter encountered: "vaid users"
[2022/07/26 23:23:33.424743,  0] ../../lib/param/loadparm.c:1874(lpcfg_do_service_parameter)
  Ignoring unknown parameter "vaid users"
[2022/07/26 23:23:33.426362,  0] ../../source3/lib/interface.c:669(load_interfaces)
  WARNING: no network interfaces found
[2022/07/26 23:23:33.796138,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2022/07/26 23:23:33.807881,  0] ../../source3/smbd/server.c:1243(open_sockets_smbd)
  open_sockets_smbd: No sockets available to bind to.
[2022/07/26 23:23:33.810029,  0] ../../source3/lib/util.c:830(smb_panic_s3)
  PANIC (pid 1623): open_sockets_smbd() failed
[2022/07/26 23:23:33.810840,  0] ../../lib/util/fault.c:222(log_stack_trace)
  BACKTRACE:
   #0 log_stack_trace + 0x35 [ip=0x8010df5d5] [sp=0x7fffffffd900]
   #1 smb_panic_s3 + 0x56 [ip=0x80173f5a6] [sp=0x7fffffffe1d0]
   #2 smb_panic + 0x17 [ip=0x8010df3c7] [sp=0x7fffffffe1f0]
   #3 smbd_exit_server + 0x3d5 [ip=0x8013e7375] [sp=0x7fffffffe200]
   #4 smbd_exit_server + 0x11 [ip=0x8013e6fb1] [sp=0x7fffffffe250]
   #5 <unknown symbol> [ip=0x8021cdbfc] [sp=0x7fffffffe260]
   #6 main + 0x1e9a [ip=0x1031a8a] [sp=0x7fffffffe270]
   #7 _start + 0xe2 [ip=0x102d3e2] [sp=0x7fffffffe650]
   #8 <unknown symbol> [ip=0x80105b008] [sp=0x7fffffffe660]
[2022/07/26 23:23:33.978251,  0] ../../source3/lib/dumpcore.c:310(dump_core)
  unable to change to %N.core
  refusing to dump core
Anything here to tell us why it is not working?
 
I note that in the samba config you are telling samba to use network interface em0
Code:
preferred master = yes
interfaces = em0
bind interfaces only = yes
however in the rc.conf section your network interface is listed as being re0, so one of those is probably wrong
Code:
ifconfig_re0="inet 192.168.1.10 netmask 255.255.255.0"

fix the spelling of "valid users" in [Movies] block of the samba config to fix this
Code:
 Unknown parameter encountered: "vaid users"
 
Can leave "bind interfaces only" if you make the "interfaces" and ifconfig_xx0 match. Didn't jump out at me before.
 
Thanks anlashok & msplsh.. Being a complete newbie, I followed the blog post a little bit too much "to the letter" and didn't notice the differences.
After changing this line,
interfaces = em0 to interfaces = re0, it just started working. I changed the line, rebooted the system and checked the status of smbd.. it was running and everything started working.
 
You can disable nmbd (runs on ports 137, 139), it's for pre-Windows 2000 versions of Windows. Modern Windows' SMB file sharing works on port 445 exclusively.

Code:
samba_server_enable="YES"
nmbd_enable="NO"
 
Back
Top