David Brodbeck
2002-Dec-12 14:08 UTC
[Samba] PDF printing problem - can't find Samba's spool file?
I'm still struggling with this, and people keep asking me why the PDF printer still isn't working...does anyone have any suggestions? -----Original Message----- From: David Brodbeck Sent: Monday, December 09, 2002 4:09 PM To: 'samba@samba.org' Subject: PDF printing problem - can't find Samba's file? I'm sure this is something simple, but I can't figure it out. After a printing system upgrade, my old PDF-writer script (which acted as an lp input filter) stopped working. I took this as an opportunity to rewrite it to work straight from Samba. But I'm having an odd problem -- I can't find Samba's job file. Here's the entry: [pdf2] path = /export/spool printable = yes guest ok = yes print command = /usr/local/bin/mkpdf2.pl %s %U %I >>/tmp/pdf.log 2>&1 lpq command lprm command I had the script print out the parameters it got. It's getting filenames like: smbprn.000413.8dCLi2 Note that there's no path on the front of that filename, like I expected with %s. And sure enough, the file isn't in /export/spool. In fact, I can't find it *anywhere*. Any ideas where it's going? ---------- David Brodbeck, System Administrator InterClean Equipment, Inc. Ypsilanti, Michigan davidb@mail.interclean.com (734) 975-2967 x221
Kurt Pfeifle
2002-Dec-12 15:34 UTC
[Samba] PDF printing problem - can't find Samba's spool file?
Dave Brodbeck wrote on Samba-digest:> Message: 21 > From: David Brodbeck <DavidB@mail.interclean.com> > To: "'samba@samba.org'" <samba@samba.org> > Date: Thu, 12 Dec 2002 09:06:45 -0500 > Subject: [Samba] PDF printing problem - can't find Samba's spool file? > > I'm still struggling with this, and people keep asking me why the PDF > printer still isn't working...does anyone have any suggestions?Hi, Dave, I guess anybody here on the list who is slightly interested in printing thought when reading your first mail: "Well, if Dave is System Admin, he'll surely know *which* printing system he upgraded, and to *which version*. If he doesn't want to tell us -- we can't help him. Maybe he realizes the gap in the info he's provided and and he'll deliver it in an afterglow. Let's wait until he comes forward with it..." Cheers, Kurt.> -----Original Message----- > From: David Brodbeck > Sent: Monday, December 09, 2002 4:09 PM > To: 'samba@samba.org' > Subject: PDF printing problem - can't find Samba's file? > > > I'm sure this is something simple, but I can't figure it out. > > After a printing system upgrade, my old PDF-writer script (which acted as an > lp input filter) stopped working. I took this as an opportunity to rewrite > it to work straight from Samba. But I'm having an odd problem -- I can't > find Samba's job file. Here's the entry: > > [pdf2] > path = /export/spool > printable = yes > guest ok = yes > print command = /usr/local/bin/mkpdf2.pl %s %U %I >>/tmp/pdf.log > 2>&1 > lpq command > lprm command > > I had the script print out the parameters it got. It's getting filenames > like: > smbprn.000413.8dCLi2 > > Note that there's no path on the front of that filename, like I expected > with %s. And sure enough, the file isn't in /export/spool. In fact, I > can't find it *anywhere*. Any ideas where it's going? > > ---------- > > David Brodbeck, System Administrator > InterClean Equipment, Inc. > Ypsilanti, Michigan > davidb@mail.interclean.com > (734) 975-2967 x221
David Brodbeck
2002-Dec-12 16:20 UTC
[Samba] PDF printing problem - can't find Samba's spool file?
> -----Original Message----- > From: Kurt Pfeifle [mailto:kpfeifle@danka.de]> I guess anybody here on the list who is slightly interested in printingthought> when reading your first mail: "Well, if Dave is System Admin, he'llsurely> know *which* printing system he upgraded, and to *which version*. If he > doesn't want to tell us -- we can't help him. Maybe he realizes the gap > in the info he's provided and and he'll deliver it in an afterglow. Let's > wait until he comes forward with it..."If you had actually looked at the information I posted, you'd have noticed that I had decided to do what everyone else seems to be doing with their PDF printers, and avoided the printing system altogether. I didn't post that information because it didn't seem relevent to the question.> > [pdf2] > > path = /export/spool > > printable = yes > > guest ok = yes > > print command = /usr/local/bin/mkpdf2.pl %s %U %I > >>/tmp/pdf.log > > 2>&1 > > lpq command > > lprm commandThis won't go through the printing system at all, will it, since I've specified a 'print command' entry? My problem is that Samba never seems to create the job file in the /export/spool directory. It just isn't there when my script is called by Samba. However, if the information will satisfy your sarcasm reflex, I was previously using LPRng, but a RedHat security update seems to have changed me over to CUPS 1.1.14.
David Brodbeck
2002-Dec-12 16:53 UTC
[Samba] PDF printing problem - can't find Samba's spool file?
> -----Original Message----- > From: Ben Griffith [mailto:bgriffit@email.unc.edu]> It may be a "cups thing". > If smb.conf has printing = cups, any manually set print > commands are ignored.Yeah, I thought of that too, so I commented out the printing = cups line (actually, the whole generic [printers] section.) It still didn't work, though.> Are there any hints in the cups logs?The errors in the CUPS logs are all from before I made that change, and have to do with it being unhappy with my old PDF printer (which was an lpd input filter). I don't get any CUPS errors with the current configuration.
David Brodbeck
2002-Dec-12 16:59 UTC
[Samba] PDF printing problem - can't find Samba's spool file?
> -----Original Message----- > From: Ben Griffith [mailto:bgriffit@email.unc.edu]> It may be a "cups thing". > If smb.conf has printing = cups, any manually set print > commands are ignored.One other thing -- I know my manually set 'print command' is being executed because I get debugging output from my script.
David Brodbeck
2002-Dec-12 19:32 UTC
[Samba] PDF printing problem - can't find Samba's spool file?
> -----Original Message----- > From: Kurt Pfeifle [mailto:kpfeifle@danka.de]> *Seems*... > > I tell you what mine is doing: It *uses* the printing system.Okay. I know the one Linux Journal talked about a while back did not -- it was just a shell script that was run as a 'print command'. This has some advantages, one being it's a lot easier to send a popup notification, since you already have the client IP. My old script, the one that was an lpd input filter, had to go through some gyrations to figure out the IP associated with the username that the job was submitted under.> My printing > system is CUPS, the most flexible one of them all. I use a bash shell > script which is made to work as a CUPS "backend".This sounds interesting, and I may look into it if I can't figure this out. I was hoping to get rid of the added complication of the printing system altogether, since it shouldn't really be necessary for what I'm trying to do. There are NO physical printers on the system, so running a full-blown spooling and printing system doesn't get me anything but configuration headaches and another running service for someone to exploit. And frankly, editing /etc/printcap gives me a raging headache. ;)> > I didn't post that > > information because it didn't seem relevent to the question. > > You yourself indicated that it is relevant because you said after > the upgrade your script stopped working...Right, but that script isn't the same one I'm trying to use now. That script was an lpd input filter, linked in through /etc/printcap. This one is run directly from Samba. It does work, except for the fact that Samba never creates a temporary file with the print job in it. This makes me skeptical that CUPS will work, either -- where would it get the data from? I know under LPRng, Samba simply created a temporary file, then called lpr on it. That won't work if there's no temporary file created.> And, BTW, you shouldn't call people any names, who are giving their > private time for free to help people who seem to have > problems in their profession -- or be prepared to get no answer at all.I'm sorry, but if someone is rude to me I tend to return the favor. You may want to go back and look at the tone of voice you used in your original reply to me. I *do* appreciate the help, but I don't appreciate being treated like an idiot in the process.> * Samba has a great little utility, which lets you increase > and decrease the debuglevel "on the fly", without editing > and reloading the smb.conf or stopping and starting the > daemon: > > "smbcontrol smbd debuglevel" # tells you the current debuglevel > "smbcontrol smbd debug 3" # set the debuglevel to 3Good idea. I will give this a try after business hours. Right now there's so much traffic on the system that the debug output is overwhelming at level 3. I'll keep your other suggestions, and use them if I can't get this working as-is. I really feel like it shouldn't be necessary to build a whole CUPS configuration just to do this, though. Other examples I've seen for creating PDF printers didn't.
Bob Crandell
2002-Dec-13 00:17 UTC
[Samba] PDF printing problem - can't find Samba's spool file?
>Cheers, >Kurt [ who was missing a comment about his previous hints and questions > regarding the "printing = cups" and "printcap = cups" settings > and the question if your smbd is linked against libcups? ] >Is libcups related to hiccups? Sorry. -- Bob Crandell Assured Computing When you need to be sure. Voice 541-689-9159 FAX 240-371-7237 bob@assuredcomp.com www.assuredcomp.com Eugene, Or. 97402
David Brodbeck
2002-Dec-13 03:08 UTC
[Samba] PDF printing problem - can't find Samba's spool file?
> -----Original Message----- > From: Kurt Pfeifle [mailto:kpfeifle@danka.de]> > Good idea. I will give this a try after business hours. > Right now there's > > so much traffic on the system that the debug output is > overwhelming at level > > 3.Okay, I tried this and didn't see anything that (to me) looked like a smoking gun. It's definately running my script, and with the options I expect, but there's no spool file being created. I don't see any errors related to printing. If you want I can post the debug output.> No, it isn't. If your clients don't run CUPS, you'd have to > upgrade them > to CUPS to reap the fullest of benefits from that approach > (PDF backend > script on the server). If your clients run CUPS anyway, then it is the > most easy and complete approach. If you don't have any > physical printer > in your net served by CUPS, you can well stick with what you plan.Right...currently all the clients are just Windows NT machines printing through SMB.> Please tell us the content of the smb.conf file (without comments),[global] kernel oplocks = false workgroup = INTERCLEAN security = domain server string = Main file server (Samba %v) encrypt passwords = true name resolve order = lmhosts wins bcast host stat cache = false winbind uid = 10000-20000 winbind gid = 10000-20000 password server = SERVERDELL2200 winbind separator = + create mask = 701 directory mask = 700 template homedir = /export/home/%U wins server = 152.160.178.23 map hidden = yes dos filemode = yes printer admin = @"INTERCLEAN+Domain Admins" [Admin] path = /export browsable = no force user = root valid users = @"INTERCLEAN+Domain Admins" [pdf2] path = /export/spool printable = yes guest ok = yes print command = /usr/local/bin/mkpdf2.pl %s %U %I >>/tmp/pdf.log 2>&1 lpq command lprm command [print$] path = /export/printers browsable = yes read only = yes write list = @"INTERCLEAN+Domain Admins" [PDF-Output] comment = Output directory for PDF converter. path = /export/pdf writable = yes printable = no [homes] writable = yes printable = no browsable = no [Downloads] comment = Downloaded files path = /export/downloads writable = yes printable = no [IT-Group] comment = Information Technology Group path = /export/it-group writable = yes printable = no [Engineering] comment = Design and Build Division path = /export/engineering writable = yes printable = no [xrefs] comment = AutoCAD xrefs path = /export/xrefs writable = yes printable = no [Shared] comment = Files shared between departments path = /export/shared writable = yes printable = no [Sales] comment = Sales & Marketing Division path = /export/sales writable = yes printable = no [Financial] comment = Financial path = /export/financial writable = yes printable = no [HR] comment = Human Resources files path = /export/hr writable = yes printable = no [Management] comment = Management files path = /export/management writable = yes printable = no [CDs] comment = Install CD-ROMs path = /export/CDs writable = yes printable = no [PLC] comment = PLC Programs path = "/export/engineering/R&D/Controls/PLC Programs" writable = yes printable = no This is such a basic problem that I feel like there must be something stupid I've done that I'm not seeing, but I'll be damned if I can figure out what it is. I've even tried running 'find' against the filename I get from my debug output to see if maybe the file is just going somewhere weird, but it never turns up.> Only if you tell us all your other settings will someone be able to > guess why your Samba spool directory doesn't seem to get the jobs, > or why your custom print command isn't executed (questions coming to > mind are "What's in the [general] section?"; "What's in the [printers] > section?" etc.)The custom command *is* executed. That was one of the first things I checked. I know it's being executed because I get debug output from it in /tmp/pdf.log (note the redirection in the config file above.) Also, I confirmed this by looking at the debug level 3 logs. Right now the only problem I'm having is the absence of the spool file. If I can just figure out where that's going everything else should fall into place.> Cheers, > Kurt [ who was missing a comment about his previous hints > and questions > regarding the "printing = cups" and "printcap = > cups" settings > and the question if your smbd is linked against libcups? ]Sorry, snipped it by accident. Samba is *not* linked against libcups. (I do *have* libcups, but it's possible I don't have the header files.)