6

Server: Samba on Ubuntu 12.04, with security = user.

A variety of file shares - some need to be accessible by guests, some are allowed users = user1.

Client: Windows XP, on same workgroup as the server.

StartRun\\192.168.1.240 brings up a Windows dialog box asking for username and password, before it's even displayed the list of file shares available on the server. (Supplying user1's password gets past this point, but I think the password shouldn't be required yet)

What could be causing this? How to fix this?

Ideal result: \\192.168.1.240 displays the list of shares (without any credentials), and password is only needed to access the ones with allowed users or guest ok = no in smb.conf.

1
  • I had the problem that the windows username was identical to the unix username on the machine running samba. Samba then imported the unix username and therefor always asked for the password. An easy fix was to remove the samba username via pdbedit -x -u <username>. Also see serverfault.com/questions/575394/… - the rest was taken care of via map to guest = bad user in the smb.conf
    – x29a
    Sep 24, 2014 at 9:27

1 Answer 1

6

You're going to get prompted for authentication because of the security mode you selected "security = user". To get what you want, I'd recommend Share Level Security. A detailed description as well as instructions on what to do can be found here:

http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ServerType.html#id2559114

Additionally, the site referenced describes the two samba security modes in detail. So that should help you balance security and ease of use to your own requirements.

You can also add this to your smb.conf:

security = user
map to guest = Bad User

By adding that line, you're telling the server that any user who isn't accounted for is to be treated as the guest.

4
  • So basically, guest access isn't possible once you've selected security=user?
    – OJW
    Aug 23, 2013 at 15:03
  • Well, there is a way, but it's not recommended due to the inherant security aspects. However, I've updated my answer with it
    – Colyn1337
    Aug 23, 2013 at 15:18
  • So they do similar things, but the 'map to guest' route doesn't give "user=share is deprecated" warnings (like ubuntuforums.org/showthread.php?t=1962617 ). Given that in this case we want to allow unauthenticated access to particular shares, are there any other security problems?
    – OJW
    Aug 23, 2013 at 15:26
  • @OJW, not that I can think of. Just be conscious of what nobody has access to.
    – Colyn1337
    Aug 23, 2013 at 15:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .