Printing in Linux - CUPS
PRINTING IN LINUX WITH CUPS
[pic]
Printing Programs
The four main printing programs in Linux today are:
• lpr (note this is also called lpd; here I use the terms interchangeably)
• lprng
• pdq
• cups
Note a few programs have their own printing system, such as StarOffice, and WordPerfect. They tend to be inferior in that the number of printer drivers available is often vary limited.
[pic]
lpr
• Sometimes referred to as BSD-style print queue or lpd.
• Runs as root. The fewer root programs you run, the safer your system is.
• Listens on all interfaces (including your internet interface). You cannot turn this off. Therefore, this is another security risk.
• Really only does text or postscript on its own.
• It can be coupled with Ghostscript to do graphics and support more printers.
• Setting this up can be maddening, but it works ok (sans security) once it is setup.
• lpr is the least common denominator of standards-based network printing.
• lpr is widely supported.
• From the Linux printing howto: "...recommend that people install and use CUPS or PDQ in most cases instead of (or in addition to) lpd."
• Requires separate cups-lpd package.
[pic]
lprng
• Designed to be an improvement on lpr.
• LPRng is far easier to administer for large installations than lpr.
• It supports authentication via PGP or Kerberos.
• LPRng uses more or less the same basic filter model as lpr. This means lpr print filters will work with lprng too.
• The Linux printing howto does not recommend it.
• As one user put it:
...LPRng, which is in my view an encoded acronym for "You Don't Need a printer." The BSD print arrangement could be understood with sufficient study, but with LPRng you're better off on a North Carolina beach with a metal detector, looking for treasure. Where configuring the BSD-style stuff would impart neurosis, LPRng can get you a new garment, one whose arms buckle in the back...I set about making LPRng work with my LaserJet III-D with PostScript cartridge. Two hours later, it was time to consider other options.
[pic]
pdq
• Wasn't able to get to the home page for this project, so I can't offer much info. (What I have is all second hand.)
• It is one of the two printing systems recommended by the printing howto.
• PDQ is perhaps the easiest to understand and use of the four printing systems, but it is not as powerful as CUPS.
• No info on security was available for this presentation.
• Samba (at least 2.08) does not seem to support pdq.
[pic]
CUPS
• Cups is recommended by the printing howto.
• It supports a new internet standard: the Internet Printing Protocol (IPP).
• IPP has been embraced by dozens of printer and printer server manufacturers and is supported by Microsoft Windows 2000.
• IPP, and hence CUPS, supports access control, authentication, and encryption.
• Since IPP runs over http, and CUPS supports IPP, users can check status information on a printer, manage their printers, and manage their jobs using their web browser.
• Has several GUI's for configuring, or you can use a web browser.
• Samba supports CUPS.
• KDE 2.2 includes direct cups support. Of course, you can still use cups with KDE 2.1.
• Can be configured to run on specific interfaces and specific ports.
• The cups-drivers package contains drivers for roughly 1220 printers. This doesn't include printers that are compatible (i.e. There is no hp lj2100 driver, but this printer can use the hp lj6p drivers which are present.)
• Has command line replacements for the lpr commands, but they support more options.
• Cups is supported by: Caldera, Conectiva*, Debian, easyLinux*, HP-UX, IRIX, Linux Mandrake*, Peanut*, Red Hat, Solaris, SuSE, Tru64, UNIX, TurboLinux, and AIX. The ones with a * use cups as the primary printing system.
[pic]
Installing CUPS
[pic]
RPM installs
• Get the rpms. If they are not included in your distribution, you can get them from .
• The latest version as of 07/06/01 is 1.1.9. There are two rpms: cups and cups-devel. The cups-devel is optional. Some rpm versions also include a third and fourth rpm: libcups1 and libcups1-devel.
• The latest version of the cups-drivers can be found at . The latest version is 1.0-31. Note this does require ghostscript.
• SSL support requires the SSL libraries of course.
• Warning: cups will overwrite your old printing system, especially lpr. Backup anything you want to save!
• Remove the old lpr "rpm -e lpr". Install cups: "rpm -Uvh cups-1.1.8-Linux-2.4-intel.rpm" to install the rpm(s). Note if you have a problems installing cups, trying downloading a src rpm and compiling your own version (rpm --rebuild --target="i386" rpm-source-name).
• Whichever way you install CUPS, don't forget to start it. This will vary depending on your system, but the command "/usr/sbin/cupsd" will usually work. Also, don't forget to put it in your startup files so when the occasion comes to reboot your machine, printing will still work.
• If using UNIX Printing, you’ll need to install cups-lpd package.
[pic]
Tarball installs
• Get the tarball. If they are not included in your distribution, you can get them from .
• SSL support requires the SSL libraries of course.
• cups-drivers tarball can be found at . The latest version is 0.3.6. I believe this requires ghostscript.
[pic]
Installing a New Printer via your web browser
[pic]
Go to
Note:
• You can change the port cups listens on but this is not recommended.
• If cups is listening there, you can also use a different IP address.
If localhost resolves to 127.0.0.1 (as it should), you can use localhost instead of 127.0.0.1 .
Click on the add printer button
Enter root and root's password.
First page of the Add printer "wizard"
• Now enter a name, location, and description.
• The location and description are optional but recommended.
• Here, you can see I entered myprinter, next to the computer, and optra E312. Enter whatever is appropriate for your printer.
Second page of the Add printer "wizard"
• Select the device the printer is attached to. In my case, it is my parallel port #1 (Ignore the Epson part).
• The various options are: Appsocket/HP JetDirect; Internet Printing Protocol (another cups printer, or perhaps a Windows 2000 shared printer); LPD/LPR Host or printer; parallel ports (there is a listing for each one); serial ports (there is a listing for each one); or Unknown Network Device (SMB).
Note for all attachments except parallel there is an extra step. This is discussed shortly.
Third page of the Add printer "wizard"
• Select the manufacturer of your printer (or compatible printer driver). In my case, the Optra E312 is made by Lexmark.
• The printer drivers mentioned above have 40 different manufacturers.
Fourth page of the Add printer "wizard"
• Select the model/driver of/for your printer (or compatible printer driver). In my case, it is the Optra E312
Fifth (and last) page of the Add printer "wizard"
The New Printer is added!
Special Ports
• For ports other than parallel, an extra page comes between the second and third page. An example is below.
• To print to an lpd printer server, enter "lpd://hostname/queue" . You must know the hostname and the queue name. These are the names of the printer server, not your machine.
• For things like an HP JetDirect (assuming you aren't using it's lpr support), enter "socket://hostname". Note at least some versions of the HP JetDirect firmware do not correctly implement IPP.
• For print servers than support IPP, you can use either ": or "ipp://hostname/ipp/printername". I haven't used this method myself yet.
• For serial ports, set the settings to the correct value. The command "lpinfo -v" should at least tell you the baud rate.
• To print to a SMB server (such as windows), be sure to read the Samba and cups section first! There are several ways to specify a SMB server. See the table below.
| |Username and password Not required |Username and password required |
|This machine is |smb://server/sharename |smb://username:password@server/sharename |
|in the same | | |
|workgroup | | |
|This machine is |smb://workgroup/server/sharename |smb://username:password@workgroup/server/sharename |
|in a different | | |
|workgroup | | |
The cupsd.conf file
• Like most servers in Unix, much of cups can be configured/controlled through the cupsd.conf file. Usually, this will be found in /etc/cups.
• There are six different configuration files for cups. cupsd.conf is the only one you would normally edit by hand.
• cupsd.conf has 69 different directives. We will only cover a few of them. See the official documentation for cups for information on the rest.
[pic]
Portwalling
• By default, cups will listen on every interface. Unless you want to offer your printer to the world, you must block this. Although you can firewall this (and that is a good idea anyway), you can also not have cups listen on your internet connection. This also prevents any possibility of a root exploit from the internet. Of course, you still have internal crackers to worry about...
• In cups.conf, comment out the lines:
Port 80
Port 631
• Replace them with:
Listen 127.0.0.1:631
Listen lan_ip_address:631
Listen 127.0.0.1:80
Listen lan_ip_address:80
• Still leaves a UDP port 631 open to the world though. The simplest way to close this port is by turning browsing off, but it may cause problems if you have other cups servers (and maybe clients?). The line for this is:
Browsing off
• Another way to limit access to UDP on port 631, but less secure, is to add the following lines:
BrowseAddress lan_ip_broadcast_address
BrowseAddress 127.0.0.1
BrowseAllow from 127.0.0.1
BrowseAllow from lan_ip_subnet (i.e. 192.168.1.0/24)
BrowseOrder deny,allow
[pic]
Cups and Samba
• Starting with Samba version 2.06, cups is supported.
• If you are going to print to SMB servers, or allow clients to send print jobs to your cups server using the SMB protocol, you must install and configure Samba.
• To configure Samba for CUPS (windows users can print to your cups server), edit the smb.conf file and replace the existing printing commands and options with the line:
printing = cups
• Versions of Samba older than 2.06 and broken versions of Samba (2.06 and 2.07 have been reported) require the following lines in your smb.conf file:
printing = sysv
printcap name = lpstat
print command = lp -d %p -o raw %s; rm -f %s
• You will also need to add a [printer] section to your smb.conf file. (Otherwise, you are sharing any printers!) Here is a sample one I use:
• # NOTE: If you have a CUPS print system there is no need to
• # specifically define each individual printer.
• # You must configure the Samba printers as "Generic PostScript Printer"
• # on your Windows clients.
• # If you wish to configure the printers directly on the Windows clients
• # (i.e. use the windows drivers on the clients) you must swap the
• # 'print command' line below with the commented one.
• [printers]
• comment = All Printers
• path = /var/spool/Samba
• browseable = yes
• # to allow user 'guest account' to print.
• guest ok = yes
• writable = no
• printable = yes
• create mode = 0700
• # =====================================
• # print command: see above for details.
• # =====================================
• print command = lpr-cups -P %p -o raw %s # using client side printer drivers.
• # print command = lpr-cups -P %p %s # using cups own drivers (use
• #generic PostScript on clients).
• # lpr -P %p %s
• lpq command = lpstat -o %p
lprm command = cancel %p-%j
• To configure CUPS for SAMBA (cups can use printers on windows machines), run the following command:
ln -s `which smbspool` /usr/lib/cups/backend/smb
Your Samba installation or cups installation *MAY* have already done this, so check for link first.
[pic]
Cups command line tricks and tips
• Because cups has a command line equivalent to the lp and lpr commands (I prefer lpr), all the commands that worked with the old LPD print system still work exactly the same.
• Only the lpr version of the commands will be presented here. The equivalent lp commands do differ in some cases.
• Cups, however, adds a bunch of new options you can use that are not present in LPD.
• Only a few of the options will be presented here. See the docs for the full list.
[pic]
Basic print commands
• To print to your default printer, use the command: "lpr filename".
• To print to a specific printer, use the command "lpr -P printername filename".
• To see what printers are setup, you can use the web page (see above), or use the command "lpstat -d -p". The -d tells you the default printer, and the -p lists the printers available, and their status.
[pic]
Advanced print commands - Paper orientation and size
With cups, you can easily change the printout paper orientation.
• To print portrait, you don't need any special options. It's the default.
• To print landscape, "lpr -o landscape filename"
Cups also allows you to specific media size, type and source. Of course, your printer must support the options you choose. From the cups manual, the most common are:
• Letter - US Letter (8.5x11 inches, or 216x279mm)
• Legal - US Legal (8.5x14 inches, or 216x356mm)
• A4 - ISO A4 (8.27x11.69 inches, or 210x297mm)
• COM10 - US #10 Envelope (9.5x4.125 inches, or 241x105mm)
• DL - ISO DL Envelope (8.66x4.33 inches, or 220x110mm)
• Transparency - Transparency media type or source
• Upper - Upper paper tray
• Lower - Lower paper tray
• MultiPurpose - Multi-purpose paper tray
• LargeCapacity - Large capacity paper tray
To use these options, the command is "lpr -o media=option1,option2,etc filename". Multiple options are allowed, and they are not case sensitive. Note there are no spaces in the list!
[pic]
Advanced print commands - Duplexing
• If your printer supports its, CUPS can do duplexing from the command line.
• To do duplexing, the command is "lpr -o duplexingoption filename" where duplexingoption is one of the following.
• "sides=two-sided-short-edge" is the option suitable for landscape pages.
• "sides=two-sided-long-edge" is the option is suitable for portrait pages.
• CUPS default is to print on only one side of the paper, so while there is an option for this ("sides=one-sided"), you don't need it.
If your printer doesn't support duplexing, but you want to fake it, CUPS again has options to help.
• Use the "-o page-set=set option" to select printing just the even or just the odd pages.
• The set value is either even, for even numbered pages, or odd, for odd numbered pages.
• The default is to print all pages. There is really is no option for this.
[pic]
Advanced print commands - Range of Pages
• The default is to print every page.
• The "-o page-ranges=pages" option selects a range of pages for printing.
• "pages" can be a hyphenated range such as 1-4, or a comma separated (no spaces!) list of pages, such as 3,5,6 or both, such as 3,4-6,8.
• The pages are always printed in ascending order, regardless of the order they are listed in.
[pic]
Advanced print commands - Combining Options
• Cups allow multiple options to be combined. Simply add another -o to the command.
• Suppose you wanted to print pages 3-4, and 6 landscape from the file myletter to the printer myprinter.
• The command is "lpr -P myprinter -o landscape -o page-ranges=3-4,6 myletter".
Playing Nice with MS Windows Systems: Printing with CUPS in Samba 2.2.x
CUPS is a newcomer in UNIX printing. It convinced many people upon first trial already. It is easy to manage and run. However, quite a few new features in CUPS make it different from other, more traditional printing systems. Therefor a few things need to be learned before you master CUPS.
Configuring smb.conf for CUPS
Printing with CUPS in the most basic smb.conf setup in Samba 2.2.x only needs two settings: printing = cups and printcap = cups. While CUPS itself doesn't need a printcap anymore, the cupsd.conf configuration file knows two directives (example: Printcap /etc/printcap and PrintcapFormat BSD), which control if such a file should be created for the convenience of third party applications. Make sure it is set! For details see man cupsd.conf and other CUPS-related documentation.
If SAMBA is compiled against libcups, then printcap = cups uses the CUPS API to list printers, submit jobs, etc. Otherwise it maps to the System V commands with an additional -oraw option for printing. On a Linux system, you can use the ldd command to find out details (ldd may not be present on other OS platforms, or its function may be embodied by a different command):
|transmeta:/home/kurt # ldd `which smbd` |
|libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x4002d000) |
|libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x4005a000) |
|libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) |
|libdl.so.2 => /lib/libdl.so.2 (0x401e8000) |
|libnsl.so.1 => /lib/libnsl.so.1 (0x401ec000) |
|libpam.so.0 => /lib/libpam.so.0 (0x40202000) |
|libc.so.6 => /lib/libc.so.6 (0x4020b000) |
|/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) |
The line "libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000)" shows there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups is set, then any otherwise manually set print command in smb.conf is ignored.
Using CUPS as a mere spooling print server -- "raw" printing with vendor drivers download
You can setup Samba and your Windows clients to use the CUPS print subsystem just as you would with any of the more traditional print subsystems: that means the use of vendor provided, native Windows printer drivers for each target printer. If you setup the [print$] share to download these drivers to the clients, their GDI system (Graphical Device Interface) will output the Wndows EMF (Enhanced MetaFile) and convert it -- with the help of the printer driver -- locally into the format the printer is expecting. Samba and the CUPS print subsystem will have to treat these files as raw print files -- they are already in the shape to be digestible for the printer. This is the same traditional setup for Unix print servers handling Windows client jobs. It does not take much CPU power to handle this kind of task efficiently.
CUPS as a network PostScript RIP -- CUPS drivers working on server, Adobe PostScript driver with CUPS-PPDs downloaded to clients
CUPS is perfectly able to use PPD files (PostScript Printer Descriptions). PPDs can control all print device options. They are usually provided by the manufacturer -- if you own a PostScript printer, that is. PPD files are always a component of PostScript printer drivers on MS Windows or Apple Mac OS systems. They are ASCII files containing user-selectable print options, mapped to appropriate PostScript, PCL or PJL commands for the target printer. Printer driver GUI dialogs translate these options "on-the-fly" into buttons and drop-down lists for the user to select.
CUPS can load, without any conversions, the PPD file from any Windows (NT is recommended) PostScript driver and handle the options. There is a web browser interface to the print options (select and click on one "Configure Printer" button to see it), a commandline interface (see man lpoptions or try if you have lphelp on your system) plus some different GUI frontends on Linux UNIX, which can present PPD options to the users. PPD options are normally meant to become evaluated by the PostScript RIP on the real PostScript printer.
CUPS doesn't stop at "real" PostScript printers in its usage of PPDs. The CUPS developers have extended the PPD concept, to also describe available device and driver options for non-PostScript printers through CUPS-PPDs.
This is logical, as CUPS includes a fully featured PostScript interpreter (RIP). This RIP is based on Ghostscript. It can process all received PostScript (and additionally many other file formats) from clients. All CUPS-PPDs geared to non-PostScript printers contain an additional line, starting with the keyword *cupsFilter. This line tells the CUPS print system which printer-specific filter to use for the interpretation of the accompanying PostScript. Thus CUPS lets all its printers appear as PostScript devices to its clients, because it can act as a PostScript RIP for those printers, processing the received PostScript code into a proper raster print format.
CUPS-PPDs can also be used on Windows-Clients, on top of a PostScript driver (recommended is the Adobe one).
This feature enables CUPS to do a few tricks no other spooler can do:
• act as a networked PostScript RIP (Raster Image Processor), handling printfiles from all client platforms in a uniform way;
• act as a central accounting and billing server, as all files are passed through the pstops Filter and are therefor logged in the CUPS page_log. - NOTE: this can not happen with "raw" print jobs, which always remain unfiltered per definition;
• enable clients to consolidate on a single PostScript driver, even for many different target printers.
Windows Terminal Servers (WTS) as CUPS clients
This setup may be of special interest to people experiencing major problems in WTS environments. WTS need often a multitude of non-PostScript drivers installed to run their clients' variety of different printer models. This often imposes the price of much increased instability. In many cases, in an attempt to overcome this problem, site administrators have resorted to restrict the allowed drivers installed on their WTS to one generic PCL- and one PostScript driver. This however restricts the clients in the amount of printer options available for them -- often they can't get out more then simplex prints from one standard paper tray, while their devices could do much better, if driven by a different driver!
Using an Adobe PostScript driver, enabled with a CUPS-PPD, seems to be a very elegant way to overcome all these shortcomings. The PostScript driver is not known to cause major stability problems on WTS (even if used with many different PPDs). The clients will be able to (again) chose paper trays, duplex printing and other settings. However, there is a certain price for this too: a CUPS server acting as a PostScript RIP for its clients requires more CPU and RAM than just to act as a "raw spooling" device. Plus, this setup is not yet widely tested, although the first feedbacks look very promising...
Setting up CUPS for driver download
The cupsadsmb utility (shipped with all current CUPS versions) makes the sharing of any (or all) installed CUPS printers very easy. Prior to using it, you need the following settings in smb.conf:
|[global] |
|load printers = yes |
|printing = cups |
|printcap name = cups |
| |
|[printers] |
|comment = All Printers |
|path = /var/spool/samba |
|browseable = no |
|public = yes |
|guest ok = yes |
|writable = no |
|printable = yes |
|printer admin = root |
| |
|[print$] |
|comment = Printer Drivers |
|path = /etc/samba/drivers |
|browseable = yes |
|guest ok = no |
|read only = yes |
|write list = root |
For licensing reasons the necessary files of the Adobe Postscript driver can not be distributed with either Samba or CUPS. You need to download them yourself from the Adobe website. Once extracted, create a drivers directory in the CUPS data directory (usually /usr/share/cups/). Copy the Adobe files using UPPERCASE filenames, to this directory as follows:
| ADFONTS.MFM |
|ADOBEPS4.DRV |
|ADOBEPS4.HLP |
|ADOBEPS5.DLL |
|ADOBEPSU.DLL |
|ADOBEPSU.HLP |
|DEFPRTR2.PPD |
|ICONLIB.DLL |
Users of the ESP Print Pro software are able to install their "Samba Drivers" package for this purpose with no problem.
Sources of CUPS drivers / PPDs
On the internet you can find now many thousand CUPS-PPD files (with their companion filters), in many national languages, supporting more than 1.000 non-PostScript models.
• ESP PrintPro () (commercial, non-Free) is packaged with more than 3.000 PPDs, ready for successful usage "out of the box" on Linux, IBM-AIX, HP-UX, Sun-Solaris, SGI-IRIX, Compaq Tru64, Digital Unix and some more commercial Unices (it is written by the CUPS developers themselves and its sales help finance the further development of CUPS, as they feed their creators)
• the Gimp-Print-Project () (GPL, Free Software) provides around 120 PPDs (supporting nearly 300 printers, many driven to photo quality output), to be used alongside the Gimp-Print CUPS filters;
• TurboPrint () (Shareware, non-Free) supports roughly the same amount of printers in excellent quality;
• OMNI () (LPGL, Free) is a package made by IBM, now containing support for more than 400 printers, stemming from the inheritance of IBM OS/2 KnowHow ported over to Linux (CUPS support is in a Beta-stage at present);
• HPIJS () (BSD-style licences, Free) supports around 120 of HP's own printers and is also providing excellent print quality now;
• Foomatic/cupsomatic () (LPGL, Free) from are providing PPDs for practically every Ghostscript filter known to the world, now usable with CUPS.
NOTE: the cupsomatic trick from is working different from the other drivers. While the other drivers take the generic CUPS raster (produced by CUPS' own pstoraster PostScript RIP) as their input, cupsomatic "kidnaps" the PostScript inside CUPS, before RIP-ping, deviates it to an external Ghostscript installation (which now becomes the RIP) and gives it back to a CUPS backend once Ghostscript is finished. -- CUPS versions from 1.1.15 and later will provide their pstoraster PostScript RIP function again inside a system-wide Ghostscript installation rather than in "their own" pstoraster filter. (This CUPS-enabling Ghostscript version may be installed either as a patch to GNU or AFPL Ghostscript, or as a complete ESP Ghostscript package). However, this will not change the cupsomatic approach of guiding the printjob along a different path through the filtering system than the standard CUPS way...
Once you installed a printer inside CUPS with one of the recommended methods (the lpadmin command, the web browser interface or one of the available GUI wizards), you can use cupsaddsmb to share the printer via Samba. cupsaddsmb prepares the driver files for comfortable client download and installation upon their first contact with this printer share.
cupsaddsmb
The cupsaddsmb command copies the needed files for convenient Windows client installations from the previously prepared CUPS data directory to your [print$] share. Additionally, the PPD associated with this printer is copied from /etc/cups/ppd/ to [print$].
|root# cupsaddsmb -U root infotec_IS2027 |
|Password for root required to access localhost via SAMBA: |
|[type in password 'secret'] |
To share all printers and drivers, use the -a parameter instead of a printer name.
Probably you want to see what's going on. Use the -v parameter to get a more verbose output:
|root# cupsaddsmb -v -U root infotec_IS2027 |
|Password for root required to access localhost via SAMBA: |
|Running command: smbclient //localhost/print\$ -N -U'root%secret' \ |
|-c 'mkdir W32X86;put \ |
|/var/spool/cups/tmp/3cd1cc66376c0 \ |
|W32X86/infotec_IS2027.PPD;put \ |
|/usr/share/cups/drivers/ADOBEPS5.DLL \ |
|W32X86/ADOBEPS5.DLL;put \ |
|/usr/share/cups/drivers/ADOBEPSU.DLL \ |
|W32X86/ADOBEPSU.DLL;put \ |
|/usr/share/cups/drivers/ADOBEPSU.HLP \ |
|W32X86/ADOBEPSU.HLP' |
|added interface ip=10.160.16.45 bcast=10.160.31.255 nmask=255.255.240.0 |
|added interface ip=192.168.182.1 bcast=192.168.182.255 nmask=255.255.255.0 |
|added interface ip=172.16.200.1 bcast=172.16.200.255 nmask=255.255.255.0 |
|Domain=[TUX-NET] OS=[Unix] Server=[Samba 2.2.3a.200204262025cvs] |
|NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86 |
|putting file /var/spool/cups/tmp/3cd1cc66376c0 as \ |
|\W32X86/infotec_IS2027.PPD (17394.6 kb/s) \ |
|(average 17395.2 kb/s) |
|putting file /usr/share/cups/drivers/ADOBEPS5.DLL as \ |
|\W32X86/ADOBEPS5.DLL (10877.4 kb/s) \ |
|(average 11343.0 kb/s) |
|putting file /usr/share/cups/drivers/ADOBEPSU.DLL as \ |
|\W32X86/ADOBEPSU.DLL (5095.2 kb/s) \ |
|(average 9260.4 kb/s) |
|putting file /usr/share/cups/drivers/ADOBEPSU.HLP as \ |
|W32X86/ADOBEPSU.HLP (8828.7 kb/s) \ |
|(average 9247.1 kb/s) |
| |
|Running command: smbclient //localhost/print\$ -N -U'root%secret' \ |
|-c 'mkdir WIN40;put \ |
|/var/spool/cups/tmp/3cd1cc66376c0 \ |
|WIN40/infotec_IS2027.PPD;put \ |
|/usr/share/cups/drivers/ADFONTS.MFM \ |
|WIN40/ADFONTS.MFM;put \ |
|/usr/share/cups/drivers/ADOBEPS4.DRV \ |
|WIN40/ADOBEPS4.DRV;put \ |
|/usr/share/cups/drivers/ADOBEPS4.HLP \ |
|WIN40/ADOBEPS4.HLP;put \ |
|/usr/share/cups/drivers/DEFPRTR2.PPD \ |
|WIN40/DEFPRTR2.PPD;put \ |
|/usr/share/cups/drivers/ICONLIB.DLL \ |
|WIN40/ICONLIB.DLL;put \ |
|/usr/share/cups/drivers/PSMON.DLL \ |
|WIN40/PSMON.DLL;' |
|added interface ip=10.160.16.45 bcast=10.160.31.255 nmask=255.255.240.0 |
|added interface ip=192.168.182.1 bcast=192.168.182.255 nmask=255.255.255.0 |
|added interface ip=172.16.200.1 bcast=172.16.200.255 nmask=255.255.255.0 |
|Domain=[TUX-NET] OS=[Unix] Server=[Samba 2.2.3a.200204262025cvs] |
|NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40 |
|putting file /var/spool/cups/tmp/3cd1cc66376c0 as \ |
|WIN40/infotec_IS2027.PPD (26091.5 kb/s) \ |
|(average 26092.8 kb/s) |
|putting file /usr/share/cups/drivers/ADFONTS.MFM as \ |
|WIN40/ADFONTS.MFM (11241.6 kb/s) \ |
|(average 11812.9 kb/s) |
|putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \ |
|WIN40/ADOBEPS4.DRV (16640.6 kb/s) \ |
|(average 14679.3 kb/s) |
|putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \ |
|WIN40/ADOBEPS4.HLP (11285.6 kb/s) \ |
|(average 14281.5 kb/s) |
|putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \ |
|WIN40/DEFPRTR2.PPD (823.5 kb/s) \ |
|(average 12944.0 kb/s) |
|putting file /usr/share/cups/drivers/ICONLIB.DLL as \ |
|WIN40/ICONLIB.DLL (19226.2 kb/s) \ |
|(average 13169.7 kb/s) |
|putting file /usr/share/cups/drivers/PSMON.DLL as \ |
|WIN40/PSMON.DLL (18666.1 kb/s) \ |
|(average 13266.7 kb/s) |
| |
|Running command: rpcclient localhost -N -U'root%secret' \ |
|-c 'adddriver "Windows NT x86" \ |
|"infotec_IS2027:ADOBEPS5.DLL:infotec_IS2027.PPD: \ |
|ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"' \ |
|cmd = adddriver "Windows NT x86" "infotec_IS2027:ADOBEPS5.DLL: \ |
|infotec_IS2027.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL" |
|Printer Driver infotec_IS2027 successfully installed. |
| |
|Running command: rpcclient localhost -N -U'root%secret' \ |
|-c 'adddriver "Windows 4.0" \ |
|"infotec_IS2027:ADOBEPS4.DRV:infotec_IS2027.PPD: \ |
|NULL:ADOBEPS4.HLP: \ |
|:PSMON.DLL:RAW:ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"' |
|cmd = adddriver "Windows 4.0" "infotec_IS2027:ADOBEPS4.DRV: \ |
|infotec_IS2027.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL: \ |
|RAW:ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL" |
|Printer Driver infotec_IS2027 successfully installed. |
| |
|Running command: rpcclient localhost -N -U'root%secret' \ |
|-c 'setdriver infotec_IS2027 infotec_IS2027' |
|cmd = setdriver infotec_IS2027 infotec_IS2027 |
|Succesfully set infotec_IS2027 to driver infotec_IS2027. |
| |
|root# |
If you look closely, you'll discover your root password was transferred unencrypted over the wire, so beware! Also, if you look further her, you'll discover error messages like NT_STATUS_OBJECT_NAME_COLLISION in between. They occur, because the directories WIN40 and W32X86 already existed in the [print$] driver download share (from a previous driver installation). They are harmless here.
Now your printer is prepared for the clients to use. From a client, browse to the CUPS/Samba server, open the "Printers" share, right-click on this printer and select "Install..." or "Connect..." (depending on the Windows version you use). Now their should be a new printer in your client's local "Printers" folder, named (in my case) "infotec_IS2027 on kde-bitshop"
NOTE: cupsaddsmb will only reliably work with CUPS version 1.1.15 or higher and Samba from 2.2.4. If it doesn't work, or if the automatic printer driver download to the clients doesn't succeed, you can still manually install the CUPS printer PPD on top of the Adobe PostScript driver on clients and then point the client's printer queue to the Samba printer share for connection, should you desire to use the CUPS networked PostScript RIP functions.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- printing in linux cups
- bt dashboard installation guide veterans affairs
- weather display linux installation setup guide
- hướng dẫn thực hành
- overview temple university
- linux operating system administration
- displaying the sap directories
- linux mtd subsystem with xilinx emc core howto
- lab 1 15 111 game of tic tac toe
- guide to operating systems security