13.5 Sharing Printers with Windows Systems


In this section, we'll consider printing to and from Windows systems.

13.5.1 Printing to a Windows Printer from a Unix System

Like most System V-based Unix operating systems, Windows NT and Windows 2000 systems provide an LPD service to handle incoming remote print jobs from non-Windows systems. The queues on the client Unix systems can be set up as normal for outgoing printing to a remote LPD server (as discussed earlier in this chapter). On the Windows server, you will need to do the following:

  • Install the LPD printing support software, if necessary. This is part of the Windows TCP/IP implementation, but it is not selected by default at initial operating system installation. Under Windows NT 4, you can do this via the Services tab of the Network Properties dialog.

    Under Windows 2000, start the Add/Remove Programs control panel applet, click Add/Remove Windows Components, and then select Other Network File and Print Services. Click the Details button, and then choose Print Services for Unix.

  • Start the LPD service. Under Windows NT 4, execute the net start lpdsvc command to start the incoming print job server. You may want to add this command to the AutoExNT.Bat file if you have installed that facility.

    Under Windows 2000, navigate to the Services and Applications figs/u2192.gif Services object in the Computer Management application. Then select the TCP/IP Print Server entry and change the start up method to Automatic (as illustrated in Figure 13-7).

Figure 13-7. Modifying the Windows 2000 LPD service
figs/esa3.1307.gif

13.5.2 Accepting Incoming Windows Print Jobs via Samba

The Samba facility can be used to make Unix printers visible to Windows clients as normal shared printers (for Samba basics, see Section 10.4).

Sharing a printer can be accomplished in two ways: by creating a share entry for a specific printer or by sharing all of theprinters within a printcap file. Here is a Samba configuration file entry corresponding to the first approach. It creates a share named laser4:

[laser4]     printable = yes                   Entry is a printer.     comment = LW on dalton            Browse description.     public = yes     postscript = yes                  Jobs will send PostScript files.     printer name = laz4               Local printer queue name.     printer driver = Windows-name     Official Windows designation

The final field specifies the driver to be used on the Windows system when printing to this printer. It must be set to the string that appears in the Add Printer Wizard's printer selection dialog's Printers list, in other words, the descriptive name by which Microsoft refers to it (e.g., "Apple LaserWriter II NTX-J v50.5"). This field does not hold the path to the driver file.

If you want to store the printer driver files locally (rather than requiring them to be on the Windows system), you can use the printer driver location setting as well and set up a local share to hold them. This technique is discussed in detail in the Network Printing book cited earlier.

Here are some sample entries that illustrate the second approach to sharing printers with Samba:

[global]                                 Add these to the global section.   load printers = yes                    Share all printers in the printcap file.   printcap name = /usr/local/samba/lib/printcap   printing = bsd|sysv|aix|hpux|lprng     Specify local print spooler type. [printers]                               One entry for all printers.   comment = Exported printers   path = /var/spool/smb-print   printable = yes   guest ok = yes   guest account = samba   auto services = david monet            Browseable printers.

This approach requires specifying several settings with the global section of the Samba configuration file. In this example, they direct the Samba system to create shares for all of the printers listed in the designated printcap file and also specify the spooling system in use on the local system.

The printers entry completes the process of sharing printers. Our example specifies a path used for scratch space and a list of printers to appear in browse lists.

Two observations are worth making at this point:

  • You must define printers for export within a printcap-style file even if the local spooling system is not LPD-based.

  • Be aware that the auto services entry merely adds printer names to the browse list. Any printer defined in the specified printcap file will be available to users that know its name. Use a separate printcap file (as above) to make only a subset of the system's printers available via Samba.

13.5.2.1 Creating queues for the Samba printers under Windows

On the Windows system, you must create a queue for such remote printers, using the Add Printer wizard as usual. Specify the printer type as local (not remote), and then create an LPR port for it (if one doesn't already exist); select New Port, provide a port name, and then choose the LPR port type (illustrated in Figure 13-8). Then enter the name of the remote system and printer into the resulting dialog, and go on to complete the remainder of the Add Printer process as normal.

Figure 13-8. Creating an LPR port under Windows 2000
figs/esa3.1308.gif

On Windows NT 4 systems, there can be occasional problems where PostScript or PCL files are printed as text rather than having their instructions interpreted by the printers as a program to be run. This happens because the job has somehow been marked as text data rather than as raw data.

You can configure the printer to treat all jobs as raw data by accessing its Properties and then choosing the Advanced tab and then the Print Processor button. In the resulting dialog, choose the RAW setting (illustrated in Figure 13-9).

Figure 13-9. Forcing a printer into raw mode operation
figs/esa3.1309.gif

You can make this setting apply to the print spooler as a whole by setting the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LPDSVC\Parameters\SimulatePassThrough registry key to 1 .



Essential System Administration
Essential System Administration, Third Edition
ISBN: 0596003439
EAN: 2147483647
Year: 2002
Pages: 162

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net