Cannot access /usr/src directory via smb

Hello,
i'am trying to learn smb on freebsd and i tried to use the example in
https://docs.freebsd.org/en/books/handbook/network-servers/
I used this smb4.conf file.
Code:
[global]
workgroup = WORKGROUP
server string = Samba Server Version %v
netbios name = ExampleMachine
wins support = Yes
security = user
passdb backend = tdbsam

# Example: share /usr/src accessible only to 'developer' user
[src]
path = /usr/src
valid users = developer
writable  = yes
browsable = yes
read only = no
guest ok = no
public = no
create mask = 0666
directory mask = 0755
IMG_20220924_181655e.jpg

But all I get when I try to access the share(linux client: opensuse) is "permission denied".
Code:
linux:/home/as # mount -t cifs -o username=as //idun/usr/src /mnt/
Password for as@//idun/usr/src:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
I'm able to ping my FreeBSD machine with the samba server.

Here are the samba logs:
/var/log/samba4/log.nmbd:

IMG_20220924_174646e.jpg

var/log/samba4/log.smbd:
IMG_20220924_174604e.jpg

/usr/src permissions:
IMG_20220924_181350e.jpg


i installed samba via pkg install samba431 on Freebsd 13.1
Help would be nice,
Thanks.
 
Last edited by a moderator:
First of all, try to run simplified configuration: without password authorizations.
Also, try to use native windows client to avoid non-native client issues.
Here is an example of simple config.
You can use it for basic samba setup. Add another required options step-by-step.

Code:
[global]
  netbios name=SMB
  workgroup = WORKGROUP
  server string =
  log file = /var/log/samba4/log.%m
  max log size = 500
  socket options = TCP_NODELAY
  security = user
  hosts allow = 192.168. 127.
  load printers = no
  guest account = im
  map to guest = Bad User
   interfaces = 192.168.83.1/24
   socket address = 192.168.83.1
   bind interfaces only = yes
   local master = no
#   os level = 128
    os level = 16
   domain master = no
   preferred master = no
   dns proxy = no

# Use extended attributes to store file modes
    store dos attributes = yes

[documents]
  comment =
  path = /home/im/shares/documents
  public = yes
  writable = yes
  read only = no
  create mask = 0777
  directory mask = 0777
  guest ok = yes
  guest only = yes

You must tune important options:
hosts allow = 192.168. 127.
guest account = im
interfaces = 192.168.83.1/24
socket address = 192.168.83.1
Aslo you must create FreeBSD user with a same name as equal a value of "guest account ="
 
Back
Top