# Samba w/no printers: Unable to open printcap file for read!

## [sinz]

I have a Samba file server with no printers attached and there are no printers listed in my smb.conf.  However, my samba logs seem to be filling themselves with the following error:

```
[2006/11/10 15:34:01, 0] printing/pcap.c:pcap_cache_reload(159)

  Unable to open printcap file /etc/printcap for read!
```

I emerged Samba without cups support.  I'm wondering if there's a Samba option to disable looking for the /etc/printcap file since it doesn't exist on my system.  I've looked through the Samba docs but haven't found anything.  Any advice would be appreciated.  Thanks.

----------

## ferdog

In smb.conf make sure that load printers = no and that printing = cups is commented out. Then restart samba.

----------

## [sinz]

I added load printers = no and there is no printing = cups in my conf.  I restarted the daemon and I'm still getting the same error in the logs.  Any other ideas?

edit

In the Samba docs I found:  *Quote:*   

> 
> 
>  If a [printers] section occurs in the configuration file, users are able to connect to any printer specified in the local host's printcap file.
> 
> When a connection request is made, the existing sections are scanned. If a match is found, it is used. If no match is found, but a [homes] section exists, it is used as described above. Otherwise, the requested section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested section name is a valid printer share name. If a match is found, a new printer share is created by cloning the [printers] section. 

 

I take this to mean that it's trying to check the printcap file to see if the named sections are printers.  But why would it do this if I compiled without cups support?  Can I get away with setting:

```
printcap file = /dev/null
```

 ?

I can't really tinker around with this because it's a work server that is in constant use.  It's not really that big of a problem but it makes it a pain to filter through when I'm looking for real problems and with many users sharing the sever the disk space it uses is growing fairly rapidly.  Any suggestions are greatly appreciated.

----------

## timomeinen

For me the "load printers = no" worked fine. But I found a similar question in the samba mailing list. 

The solution is to add:

```
load printers = no

printing = bsd

printcap name = /dev/null

disable spoolss = yes
```

Greetings,

Timo

----------

