Re: [Samba] Samba 3.0.0, CUPS support - Unable to open printcap file cups for read!
Kurt Pfeifle wrote: [Samba] Samba 3.0.0, CUPS support - Unable to open printcap file cups for read! Fran Fabrizio fran at cis.uab.edu Tue Dec 9 20:06:56 GMT 2003 A couple more data points: # smbclient //ds119b/ps4 Password: tree connect failed: NT_STATUS_BAD_NETWORK_NAME # It means Samba doesn't know about a printer share named ps4 (nor a file share of that name) The syslog shows this as a result: Dec 9 13:46:47 ds119b smbd[21284]: [2003/12/09 13:46:47, 0] printing/pcap.c:pcap_printername_ok(282) Dec 9 13:46:47 ds119b smbd[21284]: Unable to open printcap file cups for read! This message might be bogus in your context and not lead to your real problem... Dec 9 13:46:47 ds119b smbd[21284]: [2003/12/09 13:46:47, 0] smbd/service.c:make_connection(850) Dec 9 13:46:47 ds119b smbd[21284]: ds119b (192.168.2.232) couldn't find service ps4 See? I can successfully print to this printer from the samba linux host via the standard lpr -Pps4 approach. I checked my cupsd.conf to make sure it had a Printcap = /etc/printcap and PrintcapFormat = BSD entries and it does. Have you also checked your smb.conf for an entry of load printers = yes ?? The generated /etc/printcap has only one non-comment line, ps4:. That's OK. -Fran I forgot: should you have created the ps4 printer while smbd was already running, Samba might not yet know about the printer (Samba bug -- it *should* update its list of available printer shares just like it does with file shares). Sending a kill -HUP `pidof smbd` might help. Or restart smbd. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.0, CUPS support - Unable to open printcap file cups for read!
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 for the rest of the relevant configuration entries). 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 stands to reason that it doesn't know it exists because it can't read the config. I'm more asking about the root problem of why it is complaining that it was Unable to open printcap file cups for read!. 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... -Fran -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.0, CUPS support - Unable to open printcap file cups for read!
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 -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.0, CUPS support - Unable to open printcap file cups for read!
Use testparm -v smb-conf-as-seen-by-samba.txt (hit ENTER twice) and then investigate smb-conf-as-seen-by-samba.txt. 'testparm -v' shows that samba is seeing (trimmed to the relevant entries): [global] load printers = yes printers = cups printcap name = cups [printers] comment = All Printers path = /var/spool/samba printer admin = root, @ntadmins guest ok = Yes printable = Yes browseable = No This means that *your* Samba tries to look for a printcap file with the *name* cups to read. Yes, I thought that was odd - but I wasn't sure if that was just samba's generic way of saying that it couldn't initialize the CUPS printers. There is no printcap file named 'cups'. As you say, it shouldn't be looking for one at all given that I've set printers = cups. I guess the most accurate description of the problem is to say samba isn't seeing printers = cups as the magic that it signifies, it just sees it as the name of a plain old printcap file. So my logic said to check that cups support was compiled in, and 'ldd /usr/local/samba/sbin/smbd' confirms that it is. That's when I decided to post - I was fresh out of ideas. :-) 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?) I removed the RedHat samba RPMs before compiling my own version. `which smbd` doesn't find any smbd. I start it with the full path to /usr/local/samba/sbin/smbd in my init.d file for smb. I'll keep tinkering with it. -Fran -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.0, CUPS support - Unable to open printcap file cups for read!
A couple more data points: # smbclient //ds119b/ps4 Password: tree connect failed: NT_STATUS_BAD_NETWORK_NAME # The syslog shows this as a result: Dec 9 13:46:47 ds119b smbd[21284]: [2003/12/09 13:46:47, 0] printing/pcap.c:pcap_printername_ok(282) Dec 9 13:46:47 ds119b smbd[21284]: Unable to open printcap file cups for read! Dec 9 13:46:47 ds119b smbd[21284]: [2003/12/09 13:46:47, 0] smbd/service.c:make_connection(850) Dec 9 13:46:47 ds119b smbd[21284]: ds119b (192.168.2.232) couldn't find service ps4 I can successfully print to this printer from the samba linux host via the standard lpr -Pps4 approach. I checked my cupsd.conf to make sure it had a Printcap = /etc/printcap and PrintcapFormat = BSD entries and it does. The generated /etc/printcap has only one non-comment line, ps4:. -Fran On Tue, 2003-12-09 at 13:40, Fran Fabrizio wrote: Hello, I've compiled Samba 3.0.0 with CUPS support. I verified this: # ldd /usr/local/samba/sbin/smbd *snip* libcups.so.2 = /usr/lib/libcups.so.2 (0x400dc000) *snip* My smb.conf was copied from the HOWTO and the relevant sections look like: [global] *snip* # print support load printers = yes printing = cups printcap name = cups *snip* [printers] comment = All Printers path = /var/spool/samba browseable = no public = yes guest ok = yes writable = no printable = yes printer admin = root, @ntadmins I log into the domain on an XP Pro client using the root account, and if I try to browse to the printer via My Computer -- My Network Places -- Entire Network -- MyDomain -- ds119b (this is my samba server) -- Printers and Faxes, it comes up blank. If I try to directly access the printer via \\ds119b\MyPrinterName, it gets stuck in a loop. In both cases, I am getting errors like this: Dec 9 13:38:17 ds119b smbd[21244]: [2003/12/09 13:38:17, 0] printing/pcap.c:pcap_printername_ok(282) Dec 9 13:38:17 ds119b smbd[21244]: Unable to open printcap file cups for read! Any ideas? Thanks! -Fran -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
RE: [Samba] Samba 3.0.0, CUPS support - Unable to open printcap file cups for read!
Dec 9 13:38:17 ds119b smbd[21244]: [2003/12/09 13:38:17, 0] printing/pcap.c:pcap_printername_ok(282) Dec 9 13:38:17 ds119b smbd[21244]: Unable to open printcap file cups for read! Hopefully a dumb question... but is cups running? Also, what does an lpstat -a show? ~ Daniel --- This message is the property of Time Inc. or its affiliates. It may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message. Thank you. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
RE: [Samba] Samba 3.0.0, CUPS support - Unable to open printcap file cups for read!
Hopefully a dumb question... but is cups running? Also, what does an lpstat -a show? Dumb questions are usually the right kind to be asking, it's bound to be something basic that I missed. :-) However, everything looks ok: # ps -eaf | grep cupsd root 21413 1 0 14:04 ?00:00:00 cupsd # lpstat -a ps4 accepting requests since Jan 01 00:00 I do find the Jan 01 date a bit odd, but printing is functioning normally from outside of samba on this host. Thanks, Fran -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba