This option (which has an older synonym
public
) allows or prohibits guest access to a share. The default value is
no
. If set to
yes
, it means that no username or password will be needed to connect to the share. When a user connects, the access rights will be equivalent to the designated guest user. The default account to which Samba offers the share is
nobody
. However, this can be reset with the
guest
account
configuration option. For example, the following lines allow guest user access to the
[accounting]
share with the permissions of the
ftp account:
[global]
guest account = ftp
[accounting]
path = /usr/local/account
guest ok = yes
Note that users can still connect to the share using a valid username/password combination. If successful, they will hold the access rights granted by their own account and not the guest account. If a user attempts to log in and fails, however, he or she will default to the access rights of the guest account. You can mandate that every user who attaches to the share will be using the guest account (and will have the permissions of the guest) by setting the option
guest
only
=
yes
.