Integration with Windows


This section explains how to use Linux printers from Windows computers and how to use Windows printers from Linux systems.

Printing from Windows

This section assumes that Samba (page 695) is installed and working on the Linux system that controls the printer you want to use from Windows. Samba must be set up so that the Windows user who will be printing is mapped to a Linux user (including mapping the Windows guest user to the Linux user nobody). Make sure that these users have Samba passwords. Refer to "Samba Users, User Maps, and Passwords" on page 698.

Windows supports printer sharing via SMB, allowing a printer to be shared transparently between Windows systems using the same mechanism as file sharing. Samba allows Windows users to use printers connected to Linux systems just as they would use any other shared printers. Because all Linux printers traditionally appear to be PostScript printers, the Linux print server appears to share a PostScript printer. Windows does not include a generic PostScript printer driver. Instead, Windows users must select a printer driver for a PostScript printer. The Apple Color LaserWriter driver is a good choice.

When you use rpm to install Samba, it creates a directory named /var/spool/samba that is owned by root and that anyone can read from and write to. The sticky bit (page 1057) is set for this directory, allowing a Windows user who starts a print job as a Linux user to be able to delete that job, but denying users the ability to delete print jobs of other users. Make sure this directory is in place and has the proper ownership and permissions:

$ ls -ld /var/spool/samba drwxrwxrwt 2 root root 4096 Feb 24 12:29 /var/spool/samba


Put the following two lines in the [global] section of the /etc/samba/smb.conf file:

[global] ... printing = cups printcap name = cups


The printer's share is listed in the [printers] section in smb.conf. In the following example, the path is the path Samba uses as a spool directory and is not a normal share path. The settings allow anyone, including guest, to use the printer. Setting use client driver to yes causes Windows systems to use their own drivers. Not setting this option, or setting it to no, can cause printing from Windows not to work. Make sure the [printers] section in smb.conf has the following entries:

[printers] comment = All Printers path = /var/spool/samba printer admin = root guest ok = yes printable = yes use client driver = yes browseable = no


Ideally each user who plans to print should have an account. When multiple users share the same account (for example, the nobody account), these users can delete one another's print jobs.

Modern versions of Windows (2000 and later) support IPP and, as a result, can communicate directly with CUPS. IPP is easier to manage and can be made more secure than using Samba to print from Windows. To use this feature, you must have CUPS configured on the Linux print server to allow remote IPP printing; you also need to create a new printer on the Windows system that points to the IP address of the Linux print server. The details involved in configuring a Windows machine are beyond the scope of this book. You can use testparm (page 714) and testprns to check the syntax of the Samba setup.

Printing to Windows

CUPS views a printer on a Windows machine exactly the same way it views any other printer. The only difference is the URI you need to specify when connecting it. To configure a printer connected to a Windows machine, go to the Printers page in the CUPS Web interface and select Add Printer, as you would for a local printer.

When you are asked to select the device, choose Windows Printer via SAMBA. Enter the URI of the printer in the following format: smb://windows_system/printer_name. Once you have added the printer, you can use it as you would any other printer.




A Practical Guide to Red Hat Linux
A Practical Guide to Red HatВ® LinuxВ®: Fedoraв„ў Core and Red Hat Enterprise Linux (3rd Edition)
ISBN: 0132280272
EAN: 2147483647
Year: 2006
Pages: 383

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