Recipe 23.22. Sharing Linux Printers with Windows

 < Day Day Up > 

23.22.1 Problem

You want your Windows users to have access to Linux-connected printers in your Samba workgroups or domains.

23.22.2 Solution

You need both CUPS and Samba to do this. Here's what you need to do:

  1. Install printers on your Linux boxes in the normal manner via CUPS (see Chapter 14).

  2. Install CUPS on the Samba server.

  3. Configure CUPS for Samba.

  4. Create a printers share in smb.conf on the Samba server.

To configure CUPS for Samba, run the following command:

# ln -s `which smbspool` /usr/lib/cups/backend/smb

This example printers share shares all printers on the network:

[printers]    comment = All Printers    printing = cups    printcap name = cups

Restart Samba after editing smb.conf.

Now Windows users can run the Add Printer Wizard to install printers from the network. They will need to install Windows drivers locally, so they will need Windows CDs or driver installation disks.

23.22.3 Discussion

Make sure you create a printers share, not "printer"; printers is a special reserved Samba share, like homes and global.

When you install CUPS, be sure to include a complete complement of drivers by installing the Foomatic and Gimp-Print packages. 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 (see Recipe Recipe 23.23).

With CUPS, sharing printers is much easier than it was under the old System V or Berkely printing systems. You don't have to mess about with raw queues or complex Samba shares. Just install them in the usual manner via CUPS, add the printers share to Samba, and they will magically appear in Network Neighborhood on the Windows PCs.

23.22.4 See Also

  • Chapter 14

  • Recipe 23.23

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

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