[Samba] Samba access control issue

Matthew Hacker hackermw at plu.edu
Tue Sep 27 13:39:15 MDT 2011

FYI for others who might have this trouble.

I recently had an issue with windows clients not finding a driver for a printer
on my cups/samba print server.  During debugging I eventually tried to use
cupsaddsmb to rebuild the printer driver share files.  This resulted is various
errors like

protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE and

further investigation led me to realize that "smbclient -L locahost" also failed
with access denied errors.  A couple of helpful posts on the internet suggested
ipv6 might be part of the issue and I eventually realized that

smbclient -L localhost      fails
smbclient -L      works
smbclient -L ::1            fails

After much more head scratching I realized at some point I had restricted my
hosts access like so:

hosts allow = k.k.k.k/xx,

and since my linux system (debian) like others routes both "localhost" and "::1"
to the loopback over the ipv6 interface the access control was denying access.

I changed it to:

hosts allow = k.k.k.k/xx,, ::1

which fixed the problem.  The "::1" addition is what fixed my particular
problem, I changed the 127.x to the subnet /8 since I believe that's technically
correct.  Theoretically all of the 127.x.x.x number could be used although in
practice I haven't seen that.

FYI in case anyone else sees the same error messages.


More information about the samba mailing list