< Day Day Up > |
Recipe 23.23. Sharing Windows Printers with Linux23.23.1 ProblemYou run a mixed Windows/Linux LAN, and you want your Linux users to be able to print to the Windows-connected printers. 23.23.2 SolutionYou need both CUPS and Samba to do this. Here's what you need to do:
To configure CUPS for Samba, run the following command: # ln -s `which smbspool` /usr/lib/cups/backend/smb These lines in smb.conf share all printers on the network: [printers] comment = All Printers printing = cups printcap name = cups Restart Samba after editing smb.conf. Next, install the Windows printers on the Samba server with CUPS. Open the CUPS web interface (http://localhost:631/admin). Log in as root. Click "Add Printer" and enter the printer name, which in this example is "Alps." Enter the location and description, then go to the next window, which is the Device window. Click on the drop-down menu, scroll to the bottom, and select "Windows Printer Via Samba." In the next window, "Device URI for Alps," enter the device URI. "Alps" is connected to powerpc on Windows 2000, so you must enter the "guest" username and hostname: smb://guest@powerpc/alps In the next two windows, select the printer driver. Print a test page from the server. Then move to a Linux client and open the CUPS web interface. If you configured CUPS correctly, the printer will appear. Print a test page from the Linux client. Now any Linux client on the LAN can use this printer. 23.23.3 DiscussionPrinters connected to Windows 95/98/ME do not need a username, nor do they have guest accounts. All you need to do is share the printer. Recipe Recipe 23.4 goes into more detail on enabling sharing in the various Windows versions. Note that you can use a standalone CUPS printer server, without Samba, for both Windows and Linux clients (see Chapter 14). However, you need Samba to make Windows printers available to Linux. 23.23.4 See Also |
< Day Day Up > |