Primarily because I've never gotten it to work despite frequent efforts. Offeding printer is a Lexmark Z53 (supposedly fully supported) and when ever I try to add it to an XP box I get "Server doesn't have the right driver, do you wish to upload the driver?" then when I do it says "Cannot connect to the printer. Contact your network administrator yatta yatta yatta." Relevant testparm output on the remote chance someone wants to help: [printers] comment = All Printers path = /var/spool/samba create mask = 0700 guest ok = Yes printable = Yes print command = lpr-cups -P %p %s -r # using cups own drivers (use generic PostScript on clients). lpq command = lpq -P %p lprm command = cancel %p-%j browseable = No [print$] path = /var/lib/samba/printers write list = @adm root [pdf-generator] comment = PDF Generator (only valid users) path = /var/tmp printable = Yes print command = /usr/share/samba/scripts/print-pdf %s ~%u \\\\\\\\%L\\\\%u %m %I &
> > >Hey. > >By no means an expert, so just guessing. I sympathize with your hatred, >however :) . I do not have any experience with letting the Linux box worry >about the driver, so I don't know if I'll be of any help. I've always used >drivers on the Win side. If this is what you want to do, you may need to use >"use client driver = yes" in the section where the given printer is shared. > >Tried this. I can get the driver to upload if I use Z52 drivers instead of Z53. Supposedly they are 100% compatible on the Linux/Samba side but I don't know about the differences between client side drivers. Anyway, I can successfully add the printer this way but then can't get access to it. I show these files in the /var/spool/samba directory but am not sure if they are print jobs or drivers. Print jobs probably, but then why don't they print? [root@enigma samba]# pwd /var/spool/samba [root@enigma samba]# ls -l total 0 -rw------- 1 Administrator adm 0 Jul 5 13:02 smbprn.000007.yJFI1I -rw------- 1 Administrator adm 0 Jul 5 13:32 smbprn.000008.MBiMF0 -rw------- 1 Administrator adm 0 Jul 21 15:25 smbprn.000009.xhMJBR -rw------- 1 Administrator adm 0 Jul 21 15:26 smbprn.000013.KYOcyR -rw------- 1 Administrator adm 0 Jul 21 15:27 smbprn.000017.9fsvVA [root@enigma samba]# I did try to do some printing as Administrator to try and get around the access problem. This is a Samba LDAP setup BTW but I doubt that this should matter.>Without this option, I _have_ been able to print from 9X and 2k machines, >however, under status the Win box will say "Access denied, unable to >connect". I do not have access to my config files as I am at work, but can >get them after 3:30pm today if you are still having problems. Something to >check would be the permissions on the "/var/spool/samba" directory and its >parent directories. I believe "samba" should be world writeable and the >sticky bit should be set on it. Parent directories should have execute flag >I believe they already are set: [root@enigma spool]# ls -l | grep samba drwxrwxrwt 2 root root 248 Jul 21 15:27 samba/ drwxrwxrwt 2 root root 48 Jul 21 15:36 samba3/ [root@enigma spool]# Does the "t" represent the sticky bit? Should I change the create mask?>. . . At least in a simple setup anyway. It looks like your doing something >with a bit more security (create mask=0700), however. I'll look into it a >bit more when I get home, as I am a bit lost without my box in front of me. >Good luck. > >Pete Zieba > >
OK. Here is what works for me. As usual, your mileage may vary. I assume you have installed the software for the lexmarkz53 on your linux server. I assume you can print a test page. If you can't, likely you are not printing the testpage to a raw queue. The testpage goes to a raw queue while the real print jobs go to a filtered queue, in my setup. I assume you know how to run the lexmark setup program which generates the configuration file. lexmark supplies print filters that work fine in linux to drive the z53. I wrote a tutorial on print filters some time ago. I used this filter as part of that writeup. Here is part of that tutorial. ============Start Tutorial====================There is a shell script called z53.sh. This is what your printcap file should be pointing to. /usr/local/lexmark/z53/z53.sh This print filter accepts either pdf files, text files, or postscript files. Then, using ghostscript, it converts them into a ppm format (whatever that is), then it pipes them to the real filter, which only can come from lexmark, z53, and then to your printer. Here is the z53.sh script: 2 #!/bin/bash 3 DEBUG=0 4 PDIR=/usr/local/lexmark/z53 5 TMPFILE=`mktemp /tmp/lexmark.XXXXXX` 6 7 # lxgps is a little utility used to setup the 8 # Ghostscript parameters. It sets two parameters 9 # in particular: resolution and paper size. It 10 # determines what to set these to by reading the 11 # configuration file that is passed in. 12 GSPARMS=`$PDIR/lxacgsparm z53.conf` 13 14 runz53 () 15 { 16 cat > $TMPFILE 17 file -b $TMPFILE | grep -i postscript > /dev/null 18 if [ $? -eq 0 ] 19 gs -q -dNOPAUSE $GSPARMS -sDEVICE=ppmraw -sOutputFile=- $TMPFILE | $PDIR/z53 --config z53.conf --dotcounts 20 else 21 file -b $TMPFILE | grep -i PDF > /dev/null 22 if [ $? -eq 0 ] 23 gs -q -dNOPAUSE $GSPARMS -sDEVICE=ppmraw -sOutputFile=- $TMPFILE | $PDIR/z53 --config z53.conf --dotcounts 24 else 25 enscript -B -o - $TMPFILE | gs -q -dNOPAUSE $GSPARMS -sDEVICE=ppmraw -sOutputF ile=- - | $PDIR/z53 --output blackonly --config z53.conf --dotcounts 26 fi 27 fi 28 /bin/rm -f $TMPFILE 29 } 30 31 32 runz53 2> /dev/null Some of the lines are just too long to fit so they wrap around. But this shouldn't cause us much confusion. Let's walk through this program. First, the defined constants at the top, lines 3,4,5. Line 3 DEBUG = 0, may have no use, since it is not referred to elsewhere in the script. Line 4 PDIR simply points to where the lexmark software is installed. Line 5 TMPFILE used by the mktemp command to generate a random name for a file to hold the print job before it is filtered. This file is needed only because this filter will handle pdf files, which need random access to be properly processed. Text and postscript files could just be piped. Line 12 GSPARMS holds the ghostscript parameters based on what data the user has given the lexmark setup program regarding paper size, resolution, color vs black and white. At my current setting, echo $GSPARMS returns -r600 -g5100x6600 Line 32 The script begins here. Why they used a subroutine isn't obvious to me, but maybe it helps to redirect errors to /dev/null. So, go to line 14. line 15: This simply puts the file sent to the print filter all in the $TMPFILE. Note that standard input is assumed but the file is redirected to $TMPFILE. Lines 17 to 24 are repetitive, just checking to see if the file is either PDF or Postscript. If neither is the case, then enscript is invoked to produce a postscript file. Now, I have never had a problem with a linux application sending a PDF file to my printer. Acrobat prints in postscript. And, since enscript -Z doesn't convert postscript files, these lines could all be just left out. The gs command just converts a postscript file to a ppmraw format, which is then piped to the lexmark supplied driver for this printer with the appropriate parameters. Let's rewrite this thing: #!/bin/bash PDIR=/usr/local/lexmark/z53 GSPARMS=`$PDIR/lxacgsparm z53.conf` enscript -ZB -o - | gs -q -dNOPAUSE $GSPARMS -sDEVICE=ppmraw \ -sOutputFile=- - | $PDIR/z53 --config z53.conf --dotcounts Believe it or not, this works fine, both with text files and postscript files, the only two types we expect to see coming to our printer. The only problem might be the --output blackonly parameter which I left off so I could get color printing. And, I am not sure where the errors are going to be sent, if any. The -q parameter suppresses messages from gs. ============End tutorial================= OK. You don't need to understand all the foregoing. Just know that z53.sh is pointed at by the printcap entry. z53 is the real filter supplied by lexmark. What this makes clear is if you can get a postscript, text, or pdf file to this queue, it will print it out. So, all my clients point to this queue,and all send postscript jobs (windows 98/XPhome/XPpro/linux). The printer driver which they all use is the HP laserjet + postscript, or some such. This comes with all windows machines and linux if you use cups. If you don't use cups, that's ok, because the default printing format for linux is postscript. It is also clear that you could use different z53.conf files for different queues, and have draft, high quality, and photo quality printers defined on your linux server for your clients to use. So, here is my smb.conf entry for this printer. I DO NOT use the generic printer share. This may avoid complications. [global] security = SHARE guest account = ftp [ps] comment = Filtered for Z53 path = /tmp read only = No create mask = 0700 guest ok = yes hosts allow = 192.168. printable = Yes printing = lprng print command = echo %J %p %s >> /tmp/junkJ;\ a="`echo '%J' | sed "s/^.*- //"`" ;\ echo This is truncated $a >> /tmp/junkJ;\ /usr/bin/lpr -Pps -J"$a" %s;\ rm %s lpq command = /usr/bin/lpq -Pps lprm command = /usr/bin/lprm -Pps %j lppause command = /usr/sbin/lpc hold ps %j lpresume command = /usr/sbin/lpc release ps %j share modes = No use client driver = yes [Photo] comment = Print Photos path = /tmp read only = No create mask = 0700 guest ok = yes hosts allow = 192.168. printable = Yes printing = lprng print command = echo %J %p %s >> /tmp/junkJ;\ a="`echo '%J' | sed "s/^.*- //"`" ;\ echo This is truncated $a >> /tmp/junkJ;\ /usr/bin/lpr -PPhoto -J"$a" %s;\ rm %s lpq command = /usr/bin/lpq -PPhoto lprm command = /usr/bin/lprm -PPhoto %j lppause command = /usr/sbin/lpc hold Photo %j lpresume command = /usr/sbin/lpc release Photo %j share modes = No use client driver = yes I have two queue. One is ps for all print jobs. The other is Photo. This queue is identical to ps except it uses, in the z53.sh script (renamed z53Photo.sh), a different config file. Now, if you use cups, you cannot define your own print commands. I would dump cups and use lprng unless cups has something you have to have. Here is my printcap on the server: ps|z53:\ sh:sd=/var/spool/lpd/z53:mx#0:\ :lp=/dev/lp0:\ :if=/usr/local/lexmark/z53/z53.sh :mc#1 :sh: Photo:\ sh:sd=/var/spool/lpd/z53Photo:mx#0:\ :lp=/dev/lp0:\ :if=/usr/local/lexmark/z53/z53Photo.sh :mc#1 lp|LP|z53-outfiles:\ :sd=/var/spool/lpd/lp:\ :mx#0:\ :lp=/dev/lp0:\ :sh:rw: After you set up your printcap file, the command is checkpc -f to set up the queues. BTW, I like printing in samba now. All my printing works just fine. Adding clients is very easy. It is so easy I use samba to service linux clients as well as windows clients. I think that cups introduces complications most users don't need. I don't save the drivers on the server. All clients come with built in drivers for postscript printers. This should give you something to work with. Good luck. Joel
Can't you give your subject line a more positive spin like: How frustrating printing can be for a newbie admin or Looks like I'll never understand printing | OK, some progress. I managed to get access to the | printer but now I have the bi-directional In my opinion, you can't really have problems with bi- directional communications. Samba basically passes to cups ready print stuff (pre-processed by your clients) only to be transferred to the printer. So your basic setup for cups-controlled samba printers is raw queue. Simplicity itself. Given an appropriate ppd file, cups will come to terms with exigencies of paper out, paper jam, ink out, etc. Samba provides a convenient way to store the necessary driver and support files so that they can be automagically downloaded by the client, when it first access a printer share. That makes it painless for users accustomed to click-n-print MS ways. Now the basic mechanism of setting up the client drivers' depot (rpcclient, the program underlying cupsaddsmb) got broken since about 2.2.6a according to some, but I only got real problems with 2.2.8a, when I had to implement the fully compatible printer manipulation for my parish. I haven't followed your thread but perhaps your problem and solution are described in the following document: https://bugzilla.samba.org/show_bug.cgi?id=82 If they aren't, I'll look up your previous posting. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
>>Can't you give your subject line a more positive >>spin like: >> >> How frustrating printing can be for a newbie admin >>or >> Looks like I'll never understand printing >> >> >1. If I had done this I may have been ignored or > recieved less attetion. >2. I've wasted countless hours working on it and it > has never worked for me, not even once. >Consequently, from my perspective, it is hard to see >how anyone could like it.I for one love it. It's really very easy, once you've played with it for a while. If you've "wasted" some time, then you're half way through to loving samba printing too. People on samba lists do care about each other's problems out of solidarity and as a way to compensate for being able to use a terrific free and open tool. The best subject line is a succinct description of the problem. Your problem is not that you HATE printing with samba. Rather your problem is NOT BEIN ABLE to get samba printing going. Therefore ideally your subject line should read: "Sub: RH 9.01, samba 2.2.8a - can't print to z53" Putting negative feelings in the subject line makes samba look bad, whereas in most of the threads I followed, samba wasn't the problem at all. Mostly it was a matter of various degrees of lack of experience. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
>>| OK, some progress. I managed to get access to the >>| printer but now I have the bi-directional >> >>In my opinion, you can't really have problems with >>bi-directional communications. Samba basically >> >The Lexmark software on the client side insists on >communicating with the printer. Apparently, if it >can't, it assumes there is no printer or no network >etc. According to my research the way around this is >to use the Lexmark Z52 driver, which is supposedly >100% compatible, OR to disable bidrectional printing >features from the client OR to go with straight >postscript. > >None of these has worked for me. There is something >I am missing but I have no idea what it is. Probably >something totally transparent to a guru and >completely opaque to a newbie.It's opaque to me too, probably because I'm a newbie like you. OK. So you have installed client software from CD locally on the client and it doesn't work if the printer is physically attached to your samba server. You think your client drivers want to talk to the printer bi-directionally but since it can't you can't print. Let's step back and try some other scenarios. Attach the printer locally to a client and see if the client software then works satisfactorily. Then let that client share the printer and try to print from another PC. In order to be able to know what exactly that other client gets from the printer-serving client, clean the respective drivers' cache first. You do that by opening the "Printers" window of your "System control panel", right-click on the background and choose "Server properties". Then go to the "Drivers" tab, click on each entry pointing to that printer and press "Delete" button. After deletions list all the directories under C:\WinNT\System32\spool\drivers for record. On that other PC, go to "Network neighbourhood" and locate the printer on the printer-serving client. Right-click on it and choose "Install". If you then can print to that printer, then obviously bi-directional communications is not the problem. In that case, verify what new files have been added to the above directories. These files need to be deposited in a samba-controlled directory in order to be able to off-load them to clients when they try to attach to the printer. Then read a little more from a number of excellent documents by Mr. Kurt Pfeiffle and try to make it work with your samba as printer server.>I would like to know where the uploaded drivers are >kept so I can check and see if they are getting >through.If you read Mr. Pfeiffle's documents, it will be easy to find out where it is. I can't tell you right now. However, you must assure that the mechanism for depositing the client drivers with samba does work without errors. The keywords are rpcclient and cupsaddsmb. By the way, what's your distro, release, kernel, samba, cups, etc. ? ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
Jim, you are incorrigible! I told you a hundred times you should change your subject line, because it has technically very little to do with your problem, but you still keep writing "Re: I've always HATED printing with Samba". As a matter of fact, your problem is psychological rather than technical, as your last letter shows. For reasons you won't tell us, you DO want samba NOT to be able to print to your printer. You are wasting our time.>>Putting negative feelings in the subject line makes >>samba look bad, whereas in most of the threads I>Not to be a jerk but from where I'm standing, Samba >DOES look bad. ;-) Samba, it seems, does not work >well at all with inexpensive (i.e. cost effective for >a home user) printers. I've had several of these over >the years.Well, then don't be a jerk. What you say is plain unsubstantiated BS. If you really want NO help at all, just keep on rubbing us the wrong way.>>followed, samba wasn't the problem at all. Mostly it >>was a matter of various degrees of lack of >>experience.>How many computer science degrees should a new user >have?None. I don't have any. Most of the people using computers successfully don't. All you need is to be able to think and to want to get the job done. An alphabet 101 course can take care of the rest.>but perhaps a new user should have more. ;-) >A trouble shooting guide would help.Just goes to show, you haven't read any fscking documentation. Grow up, Jim. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
>>Let's step back and try some other scenarios. Attach >>the printer locally to a client and see if the client >>software then works satisfactorily. Then let that >>client share the printer and try to print from >>another PC. >> >> >I already know that this will work as I've done it >before. It also shares fine over XP as that is how >I'm using it now. I want it on the server though. >As I mentioned before, when I am doing testing on the >server box I just unplug the USB from the XP client >box and move it over to the server. I've tried both >on-board USB 1.0 and USB 2.0 card plugs (I was >guessing that they werer probably different >chipsets... a shot in the dark).USB? No problem. But first make it run as a printer for Linux users. Once that is OK, try letting samba share it with other clients.>>In order to be able to know what exactly that other >>client gets from the printer-serving client, clean >>the respective drivers' cache first. You do that by >>opening the "Printers" window of your "System >>control panel", right-click on the background and >>choose "Server properties". Then go to the "Drivers" >>tab, click on each entry pointing to that printer >>and press "Delete" button.>Will have to send results on this in a different >email as this user doesn't have access and you can't >do user switching when on a Domain."runas local-pc\Administrator explorer.exe" from the DOX box should work under all circumstances. PS: Your subject line sucks. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
>>However, you must assure that the mechanism >>for depositing the client drivers with samba does >>work without errors. The keywords are rpcclient >>and cupsaddsmb.>Tried this: >[root@enigma root]# cupsaddsmb -a -H localhost >-v >Password for root required to access localhost via SAMBA: >Running command: smbclient //localhost/print\$ -N -U'root%********' -c............................>error connecting to 127.0.0.1:139 (Connection refused) >Error connecting to 127.0.0.1 (Connection refused) >Connection to localhost failed > >Connection refused???Yes, if you've added "bind interfaces only" or similar.>Oh well, at least I now know where the drivers are >supposed to be at. I also tried this with the >firewall down, just in case. It shouldn't be the >firewal though because the only rules I've set are >for eth0. > >Also check this out: > >[root@enigma root]# ls /usr/share/cups/drivers/* >ls: /usr/share/cups/drivers/*: > No such file or directory >... >[root@enigma cups]# pwd >/usr/share/cups >[root@enigma cups]# ls >banners/ calibrate.ppm charsets/ data/ fonts/ >model/ templates/Which part you don't understand? That ls can't list "/usr/share/cups/drives/*" when the subdir "drivers" in "/usr/share/cups" isn't there at all? The command that should have created it ("cupsaddsmb") failed. It's possible that you have to create the directory manually. Read all about it at Kurt Pfeiffle, ibidem.>>By the way, what's your distro, release, kernel, >>samba, cups, etc. ?>Mandrake 9.1 cups Samba 2.2.8 / 3.0b3 (experimental). Stock kernel.What do you mean "cups Samba 2.2.8 / 3.0b3". There is no such thing. cups must be something like 1.1.19 and samba can be either 2.2.8 or 3.0b3. The problem I referred to in a previous mail shouldn't affect 3.0b3 but will almost certainly be a nuisance in 2.2.8. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
>BTW, I found some of Kurt's stuff but it is for Samba >3.0b3 and I probably need to start with something >stable.It's probably better to first make it to print under 3.0b3. It's supposed to be stable and bug-free for printing and quite stable in other respects too. Once you get the hang of samba printing you can do it again with 2.2.8, which you will probably have to re-build adding the patch described in bug #82. Once you kill that bug printing is a smooth sail. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005