[olug] Samba, Windows clients, and pulling my hair out

Lou Duchez lou at paprikash.com
Wed Jan 23 11:39:16 UTC 2013


Yep.  Between you and me, I think it's Linux that is the problem here: 
in my experience Windows servers simply do NetBIOS right out of the box, 
but getting Linux to do NetBIOS requires inordinate fiddling.  So I'm 
left wondering why Linux can't make NetBIOS easy (which was the entire 
point), even as I abandon it.

FYI, here's the meat of my smb.conf.  As of Fedora 18, Samba is now on 
4.0.0, which causes some of your old configurations to break.  But this 
works for me, where I'm setting up a "guest" share and a 
password-protected share:

[global]
server string = Samba Server Version %v
security = user   # used to be that you could do "security = share", but 
it's finally been deprecated
map to guest = Bad Password   # this is how you simulate "security = 
share": if the user enters a bad password, treat as "guest"
interfaces = lo 192.168.2.0/24
socket address = 192.168.2.254
hosts allow = 192.168.2.
guest account = pcguest
passdb backend = smbpasswd    # this used to be the default but no 
longer is, so you may need to set this explicitly


[guestshare]
path = /samba/guestshare
guest ok = yes
guest only = yes
writable = yes
printable = no

[protectedshare]
path = /samba/protectedshare
guest ok = no
valid users = lou
writable = yes
printable = no




> I may be mis-remembering, but I think Netbios names have to go in the
> LMHosts file, not the Host file.  If that is true, that would explain why
> Windows isn't finding it.
>
> I think the method of using the full DNS name is probably the better way to
> go regardless.  NETBIOS is a relic and should be consigned to the dustbin
> of networking technologies like Token Ring, and ArcNet.
>
> Bill
>
> On Tue, Jan 22, 2013 at 10:18 PM, Lou Duchez <lou at paprikash.com> wrote:
>
>> Mostly I'm posting this in case anyone else is having trouble with Samba.
>>   I think I got it worked out.
>>
>> I set up a Samba share, I gave it a NetBIOS name, I figured out how to let
>> it allow guest access (no particular authentication).  So far so good.
>>   Then I tried setting up another share, but requiring authentication.  No
>> matter how much I tried, I couldn't get a Windows computer to authenticate.
>>   When I tried to connect from the Windows command line, after entering the
>> password, I would get the super-helpful message "System error 5 has
>> occurred".
>>
>> My first clue as to what was going on was the fact that I could
>> authenticate if I used the server's IP address rather than the NetBIOS name
>> I'd assigned it.
>>
>> Here is the long and short of it: I was trying to get to my Samba share
>> via its NetBIOS name -- "\\TERWILLIKER\protectedshare" or whatever -- and
>> that's not a good move.  Windows has trouble keeping track of the Samba
>> share via NetBIOS, such that it may be able to find the share and try to
>> authenticate, but then it gets all confused.  If you're going to rely on
>> NetBIOS, you also probably have to go to the trouble of setting up a WINS
>> server to support your NetBIOS name, otherwise your clients are going to
>> connect inconsistently at best.  You can't even get around it by putting an
>> entry in \Windows\System32\Drivers\Etc\**Hosts, because that depends upon
>> Windows being bright enough to consistently recognize your NetBIOS name as
>> such and not just a zone to prepend to your domain name.
>>
>> What you CAN do is assign a FQDN to your server; that's something Windows
>> and Linux see eye-to-eye on.  You can even put the FQDN in your
>> \Windows\System32\Drivers\Etc\**Hosts; it'd look something like this:
>>
>> 192.168.0.1 terwilliker.com
>>
>> So after that you'd access your share like:
>>
>> \\terwilliker.com\**protectedshare
>>
>> or even
>>
>> \\192.168.0.1\protectedshare
>>
>> After that, Samba seems to work per the documentation.
>>
>>
>> ______________________________**_________________
>> OLUG mailing list
>> OLUG at olug.org
>> https://lists.olug.org/**mailman/listinfo/olug<https://lists.olug.org/mailman/listinfo/olug>
>>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug




More information about the OLUG mailing list