M
M
MikUrrey2021-09-01 00:32:14
linux
MikUrrey, 2021-09-01 00:32:14

How to debug a Samba server?

Greetings!
There is a samba server on Ubuntu with the following config:

[global]
   workgroup = WORKGROUP
   netbios name = ubuntu
   security = user
   map to guest = Bad User
   usershare owner only = false
   usershare allow guests = yes
   dns proxy = no
   server string = %h server (Samba, Ubuntu)
   log level = 10
   log file = /home/mik/shared/log.%m
   max log size = 1000
   logging = file
   server role = standalone server
   obey pam restrictions = yes

[/home/mik/shared]
  path = /home/mik/shared
  browseable = yes
  guest ok = yes
  read only = no
  vfs objects = full_audit


The /home/mik/shared folder is owned by nobody:sambashare

I'm trying to connect from an android with anonymous access, but the connection fails.
The IP of the computer is correct. The first couple of times the connection worked, then something changed.
The client does not appear in the logs. systemctl status smbd.service does not show connection attempts, but once showed the line
pam_unix(samba:session): session closed for user nobody PS: And, yes, in a samba network, the machine sees and opens itself (but not always).


Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lComrade, 2021-10-22
@MikUrrey

I had the same issue. This is because the version of the SMB protocol that the client is using is lower than the version of the server. The problem appears only when the guest access.
Try: add UNIX user, add SAMBA user and restart smbd.service.
Example:

  1. The nobody user already exists, you don't need to create it.
  2. Create a SAMBA user:sudo smbpasswd -a nobody
  3. Enable the SAMBA user:sudo smbpasswd -e nobody
  4. Restart smbd: sudo systemctl restart smbd.service

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question