Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just upgraded Ubuntu server to 14.04 which took samba up to 4.1.6. My public share (local home network so not worried about security so much as family getting to files simply and anonymously), has stopped working, i.e. it will now ask for username and password.

when I run testparm I get:

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[share]"
Loaded services file OK.
Press enter to see a dump of your service definitions

        workgroup = HOHWORKGROUP
        server string = firewig
        interfaces = eth1,,
        map to guest = Bad User
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        unix password sync = Yes
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        name resolve order = lmhosts, wins, bcast, host
        dns proxy = No
        usershare allow guests = Yes
        panic action = /usr/share/samba/panic-action %d
        idmap config * : backend = tdb
        valid users = nobody

        comment = share
        path = /srv/samba/share/
        force user = nobody
        force group = nogroup
        read only = No
        create mask = 0777
        force create mode = 0777
        directory mask = 0777
        force directory mode = 0777
        guest ok = Yes

I can not seem to get my windows (W7) machine to be able to anonymously access the share. Not sure what is wrong with my config here.

share|improve this question
Have you looked in your smb and nmb logs? – mdpc Apr 30 '14 at 22:49
didnt see anything obvious, didnt think to look in the nmb logs. will check that this evening, thx – Jon May 1 '14 at 8:42

Could you tell us which kernel version are using?

There it's a problem with samba when used with lasts kernel versions because the kernel requires encrypted passwords or other problem.

I have one Ubuntu 14.04.1 where I downgraded samba from 4.1 to 3.6.3-2ubuntu2 because after the upgrade to samba 4.1 don't worked. On this machine if I use samba 3.6 with kernel 3.13 don't works, but If I use kernel 3.2 it works.

Try to change your grub or lilo for boot with an older kernel and tell us if it works.

share|improve this answer

In order to have anonymous access the creation of fake IPC$ share may help:

    guest ok = yes
    read only = yes
    path = /etc/samba/fakeIPC
    valid users = @group-of-home-users, nobody
#    valid users = nobody

This solved some problems for me. Can't remember where I've read about that.

share|improve this answer

You have to be careful about the options.

valid users=nobody, for example, does not mean that the user nobody is allowed log in. It means that no other user but nobody can log in.

Since you are obviously fine to allow guest access, just remove valid users=nobody from the global section.

Furthermore, while you have correctly set map to guest = bad user, you also have to check which user takes the role of guest on your system. Apparently, you have just assumed it's nobody but that's not necessarily the case. If you are not sure, you can specify it manually with guest account = nobody. Needless to say, nobody has to exist on your system!

Next, you need to make sure that the share has the respective POSIX permissions for nobody. For example, if your file permissions allow nobody to read the files in the share but not to modify them, then the writeable option in smb.conf is not going to override that.

Now we get to the share portion of your smb.conf, we can make this a lot simpler. If you wish to map all actions to the guest account, you don't need to use force user and force group. Just use the parameter guest only = yes instead. Together with guest ok = yes this will have the effect that all connections will be mapped to the correct guest account, in our case nobody.

Result (for full guest access):

# chmod -R a+rwX /srv/samba/share

  guest account = nobody
  map to guest = bad user

  path = /srv/samba/share
  writeable = yes
  guest ok = yes
  guest only = yes
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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