I have a working 'public' / 'guest' Samba Share on one Linux machine; the '/etc/samba/smb.conf' looks like this:

comment = Shared Directory
writable = yes
read only = no
create mask = 0644
directory mask = 0755
path= /home/myuser/shared
browseable = yes
guest ok =yes

The same smb.conf file was copied to another Linux machine; and Samba was restarted.

The original server allows me to access it without providing a username or password; the new server always requests a username and password (and actually every combination of what I think it should be doesn't work in any case).

Is there another setting somewhere else other than 'smb.conf' I need to change ?

I want this share to be public, with no username/password necessary - ie, to behave like the original server where I copied the 'smb.conf' from.

Additional: I just run a 'testparm -v' and see at least the following differences :

The original server has this in the [global] section:

security = SHARE

Whereas the new server has this:

security = USER

But I have also set up 'security = USER' (I'm using a copy of 'smb.conf' afterall) in the 'smb.conf' file on the new machine ?

Is there an over-riding configuration here ?


Ah : looks like I am using 'samba4' here - which apparently has deprecated the 'security share' mode.


.... There are several posts out there that state that doing:

map to guest = Bad User

Should emulate the 'share' facility - but it doesn't seem to work for me. (I'm attaching with a Windows7 client; and I have added a 'samba' user).

(Also: my config had 'bad user' - lowercase)......


OK - I have a solution which works for me (but is still not ideal, see below)

  1. I added a 'samba' user like this:

    sudo smbpasswd -a arthur

Where 'arthur' matches my Windows Domain Account Name (without the 'domain\' prefix).

Also it seems that I have to set the password for this to match my Windows Domain Account Password.

The reason I (guess) did this: was I noticed that my Windows7 dialogue was asking for a DOMAIN user; and seems to be both validating my domain-username/password with Windows; and then passes the same credentials to the Samba Server.

So : this kinda works for me; but isn't ideal - because:

  1. Every user will need to do this (the idea was to share this directory once; but looks like each user will need to add in their own username - since I don't know their passwords).

  2. My Domain Password will presumably go out of sync with the Samba User Password at some point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.