[Samba] samba config for guest users

Rowland penny rpenny at samba.org
Tue Dec 1 08:45:59 UTC 2020


On 30/11/2020 23:50, Pol wrote:
> that key I modified is not about "guest user" on window machine but 
> enable/disable access without password on shared folders :)
>
If you are modifying a registry key on Windows, you are only affecting 
what happens on Windows, it will have absolutely no effect on Linux 
machines.

The Windows Guest is not the Samba Guest.

I will go through it again.

By default, no Windows user is a Samba user on a standalone server, you 
have to make the Windows user into a Samba user by doing the following:

Create a Unix user on the Samba standalone server with the same name as 
the Windows user.

Make the Unix user into a Samba user by running 'smbpasswd -a username' 
as root (where 'username' is the Windows/Unix username), you will be 
prompted for a password, this should the same password as the Windows users.

At this point the Windows user should be able to connect to a share 
similar to this:

[share]
         path=/home/share
         read only = no

Provided that '/home/share' exists and the permissions on it allow the 
user access.

Guest access to a share is different, The Windows user must not exist as 
a Samba user on the Samba standalone server or it can never have guest 
access. The share must contain the line 'guest ok = yes' and 'global' 
must contain the line 'map to guest = bad user', at this point any users 
unknown to Samba will be allowed access to the share provided that the 
'o' permissions allow it.

If all of the above is valid, check if Apparmor/Selinux (depending on 
distro) is denying access.

Rowland






More information about the samba mailing list