[Samba] Samba 3.0.0, CUPS support - "Unable to open printcap file cups for read!"

Kurt Pfeifle kpfeifle at danka.de
Tue Dec 9 22:15:27 GMT 2003


Fran Fabrizio wrote:

> I've restarted the daemons many times since altering my smb.conf.  My
> smb.conf definitely has "load printers = yes" (see the smb.conf excerpt
> I sent in my initial post

Sorry, hadn't seen it....

> for the rest of the relevant configuration
> entries).
> 

So I *did* read now what *you* wrote into smb.conf.

But... is Samba reading the same thing?

Use "testparm -v > smb-conf-as-seen-by-samba.txt" (hit ENTER twice)
and then investigate "smb-conf-as-seen-by-samba.txt".

> You mention that it complains that it can't find the share - I think it
> makes perfect sense that Samba complains that it doesn't know about a
> share called 'ps4' right after it complained that it couldn't open the
> CUPS configuration. :-) 

It complained about this: "Unable to open printcap file cups for read!"

This means that *your* Samba tries to look for a printcap file with
the *name* "cups" to read.

However, if smbd is compiled against libcups, *and* if "printing = cups"
and "printcap = cups" smbd doesn't really need a printcap file and it
wouldn't look for one with that name either (It just means that it should
rely on the CUPS-API to find out available printers)....  Unless you
found a real bug, that is!

I have set "Printcap /dev/null" in cupsd.conf and re-started cupsd first
then smbd. Guess what? "smbclient -L localhost" still lists all my
printers! And I can still print from my Windows apps. (I can't print
anymore from OpenOffice, since that one *does* look for a printcap....)

> It stands to reason that it doesn't know it
> exists because it can't read the config. 

What are the access rights on that printcap file, anyway?

> I'm more asking about the root
> problem of why it is complaining that it was "Unable to open printcap
> file cups for read!".
> 

Maybe you are not running the smbd you think you are? Maybe
you compiled yourself, and are still starting the previous
smbd in a different path (not having libcups support compiled
in?)

What is "which smbd" giving you?

> Thanks for the reply - it looks like I've covered all of the gotchas
> that you mentioned.  Something else seems to be at work here...
> 

It's strange, true. That's why I come up with strange ideas.....

> -Fran
> 
> 
> 




More information about the samba mailing list