[Samba] hosts deny = X not working for printer share

Caylan Van Larson caylan at aero.und.edu
Wed May 19 16:13:13 GMT 2004

Note: This was cross posted at comp.protocols.smb

Linux: 2.6.5-1-686-smp (debian stable)
Samba: Version 3.0.2a-Debian
Cups: Version: 1.1.20final-12.backports.org.1
Network: one ip-address, one-interface

We manage multiple printers from cups, which are then exported to a  
printcap file, then loaded into samba.  All the printers work great  
from samba, Point-n-Print is operational :D  However, we would love the  
ability to restrict access to the printers based on their network  
location.  Thinking that this would be an easy task, we redeclared each  
printer in the smb.conf in this format:

   path = /var/spool/samba
   printable = yes
   hosts allow = X.X.X.X

Even though there is some redundancy with this approach, it was going  
to, in theory, allow us to give fine grained access to printers.   
However, this is not working, as we are still allowed to print to these  
printers no matter what combination of  
interfaces/hosts(allow/deny)/guest <--> global/printers/[printer]  
shares <--> ip/network/mask/ALL/ALL:ALL.  It just plain doesn't work.

I'd like to reference this article:

That's the ugliest link I've ever seen... Crappy.  If that doesn't work  
you can always search google groups for "samba will not refuse any  
connections" (1st result)

That should about do it...  Arg :P  TY in advance.


More information about the samba mailing list