sudo apt-get install smbnetfs
mkdir ~/.smb
cp /etc/smbnetfs/smbnetfs.conf ~/.smb
cp /etc/samba/smb.conf ~/.smb
tee ~/.smb/smbnetfs.auth <<EOF
auth HOSTNAME USERNAME PASSWORD
EOF
chmod 600 ~/.smb/smbnetfs.auth
Mount
mkdir MOUNTPOINT
smbnetfs MOUNTPOINT
ls MOUNTPOINT/WORKGROUP
ls MOUNTPOINT/HOSTNAME
ls MOUNTPOINT/USERNAME:PASSWORD@HOSTNAME/SHAREPOINT
Unmount
fusermount -u MOUNTPOINT
sudo tee -a /etc/resolvconf/resolv.conf.d/base <<EOF
search mydomain.com
nameserver 192.168.0.1
EOF
sudo resolveconf -u
Do newer versions need a smbnetfs.host file?
I increased the debug level and it was mentioned as missing, so I created it:
vi ~/.smb/smbnetfs.host
host 10.0.0.20 visible=true
This allowed the mount to work for me on FreeBSD 14.0.