Sharing Printers with Samba After you've added some printers to your CUPS configuration, you might want to give other users on your network access to them. Not everyone needs (or wants) a printer on their desk.CUPS automatically shares all printers through IPP, its native protocol. If you've got a system that can't connect to IPP printers, it can probably connect to printers shared on a Windows network.To share a CUPS printer with Samba
Code listing 7.2. Adding CUPS printers to your Samba shares.
# Add these lines to the existing # [global] section: printcap name = /etc/printcap load printers = yes cups options = raw # Add a [printers] section, or edit an # existing [printers] section to look # like this: [printers] comment = Shared Printers path = /var/spool/samba browseable = yes guest ok = no writable = no printable = yes
By adding a few configuration changes to our Samba setup (Code Listing 7.2), we can share our CUPS printers on the Windows network.Mac OS X users can use the Print & Fax pane of System Preferences to share printers.
1. | Open a root shell, or use su (or sudo) to become root. | 2. | If you're using Fedora Core, cd /etc/samba
or, if you're using FreeBSD, cd /usr/local/etc
| 3. | Use your favorite text editor to edit the smb.conf file. | 4. | Locate the [global] section of the smb.conf file. | 5. | Add the following directives to the [global] section of smb.conf: printcap name = /etc/printcap load printers = yes cups options = raw
| 6. | Add a [printers] section to smb.conf (or edit the current [printers] section): [printers] comment = Shared Printers path = /var/spool/samba browseable = yes guest ok = no writable = no printable = yes
| 7. | Save the smb.conf file, exit your editor, and restart the Samba services (see Chapter 6, "Hosting a File Server," for details). |
 |