Samba user=share no longer available.

The current version of Samba (4.3) no longer supports the user = share directive. Searching suggests using map to guest = bad user. However I still get the password prompt when trying to connect to the share. The password prompt is interfering with the unattended running of shell scripts on the clients. Is there any way to prevent the password challenge being prompted? I've pasted the contents of /usr/local/etc/smb4.conf below.

Code:
[global]
        server string = PR4 Samba Server
        guest account = sambauser
        map to guest = bad user

[server_share]
      path = /server_share
      writeable = yes
      browsable = yes
      guest ok = yes
      guest only = yes

Addition information: sambauser is a valid system user with password authentication but a blank password and is also entered in the Samba password file.
 
Although I'm not sure it's required, you don't have security = user under [ global ].
I'd also try removing "guest only" , and maybe replacing it with "force user = sambauser" if it's still not working
 
Thanks for trying, but no luck with either change. Is there a source of Samba 4 documentation I have missed? The documentation on the Samba site appears to be Samba 3 specific.
 
Do you have other users on the system or is it only one samba user for all shares?

Verify the user is in samba using pdbedit -L. I'd also try adding another user to see if perhaps you're not overlooking some other issue with the user (or use other existing users if you have any). Samba4 is a little more picky about the way filesystem permissions are set, so that could be an issue depending on what you're doing.

I struggled a lot with migrating from security = share, but I did get it working eventually. I never found any good documentation, and spent most of my time googling through errors that popped up. That's kinda always been the case for me and samba though.
 
Well I've 'fixed' the problem - Samba36. All my scripts and batch files are running smoothly again now. Still I'm not marking this one 'solved' because really I'm just "putting off until tomorrow what I don't have to do today."
 
Just wondering: is that the whole smb.conf file which you shared? Also, what are the clients which you're using?

You mentioned that one of those user accounts has an empty password. But by default the use of empty passwords is disallowed by Samba. See the null passwords directive. This defaults to no so that might be a possible cause (not sure of course).

Then there's something else: I know that in some cases Window clients resort to using a guest account which also uses a similar password ("guest"). Depending on the clients I suppose this might also be usable here.
 
Back
Top