A
A
Alexander2020-08-14 11:16:54
Samba
Alexander, 2020-08-14 11:16:54

Samba - Access to server without password?

Hello.
Installed fresh Debian 10.5 with all updates. Samba v.4.9.5 is also installed, which will be used as a file server.
When a guest connects from Windows to the server, it constantly asks for a password, how can I remove this authorization?
I need ALL guests to be able to freely connect to the server and see the available folders, but I'll figure it out with access to the folders themselves.

samba config
[global]

   workgroup = WORKGROUP
   netbios name = fs
   interfaces = 192.168.1.0/24 eth0
   bind interfaces only = yes
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   logging = file
   panic action = /usr/share/samba/panic-action %d

   security = user
   map to guest = bad user

#   usershare max shares = 100
   usershare allow guests = yes

#======================= Share Definitions =======================

[test]
   comment = test
   path = /archive-zfs/test
   browseable = yes
#   force group = users
   guest ok = yes
   read only = no
   create mask = 0755
   directory mask = 0755

   write list = root, @lpadmin, @alterak

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Fenrir89, 2020-09-02
@Fenrir89

Previously (up to the third version inclusive) to implement this task, we used the indication in the [global] section of the directive security = share, and in the section of the shares itself - just guest ok = yes and everything worked as it should. Now you need to do it a little differently, namely: You
need to use the security = user and map to guest = Bad Password directives in the [global] section, and also specify guest ok = yes in the shares section.
The fact is that the security = share|server directives are considered obsolete, which is why we have to use security = user. To separate the user from the guest, a new directive map to guest = Bad Password is used (the meaning of which is that if a Samba user exists in the system and an incorrect password is entered, then the entry of this user is rejected, if the user does not exist, then he is assigned the guest status ). Well, in order to open access to the shared resource for guests, the good old directive guest ok = yes remains, which must be specified directly in the share section.

A
Antuan1979, 2020-08-14
@Antuan1979

[global]
security = user
workgroup = MYGROUP
server string = Samba
guest account = nobody
map to guest = Bad User

[share]
path = /mnt/files
browseable = Yes
guest ok = Yes
writeable = Yes
public = yes

Next chmod.....
Just note that this configuration will work fine on Mac and Linux systems, but Windows clients will not be able to connect there - Windows limitations. The most suitable solution is to organize access by ip or password (just check the box: save password)!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question