Configuring Print Servers


You've configured a printer so that you and the other users on your computer can print to it. Now you want to share that printer with other people in your home, school, or office. Basically, that means configuring that printer as a print server.

The printers that are configured on your Linux system can be shared in different ways with other computers on your network. Not only can your computer act as a Linux print server, it can also look to client computers like an SMB print server. In other words, a Windows client would just see your printer as a printer from another Windows machine.

After a local printer is attached to your Linux system, and your computer is connected to your local network, you can use the procedures in this section to share it with client computers using a Linux (UNIX) or SMB interface.

Cross-Reference 

See Chapter 26 for information on configuring Linux as an AppleTalk server using the netatalk package.

Configuring a Shared CUPS Printer

After a local printer is added to your Linux computer, making it available to other computers on your network is fairly easy. If a TCP/IP network connection exists among the computers sharing the printer, you can simply grant permission to individual hosts or users from remote hosts to access your computer's printing service. The procedures for setting up local printers are discussed earlier in this chapter.

To share a local printer as a print server to other computers on your network, do the following:

  1. From the desktop panel, select System Administration Printing. The Printer configuration window appears.

  2. Click the name of the printer you want to share. (If the printer is not yet configured, refer to the "Setting Up Printers" section earlier in this chapter.)

  3. Select the Shared box on the Settings tab so that a checkmark appears in the box.

  4. If you want only selected users to access your printer, select the Access Control tab. Select Deny Printing for Everyone Except These Users, type each user you want to allow to use the printer, and click Add to add each user . Likewise, you could select Allow Printing for Everyone Except These Users and add selected users to be excluded from those allowed to print.

  5. Click Apply to make the changes permanent.

At this point, you can configure other computers to use your printer. If you try to print from another computer and it doesn't work, here are a few things to try:

  • Open your firewall - If you have a restrictive firewall, it may not permit remote users to access your printers. You must allow access to port 513 (UDP and TCP) and possibly port 631 to allow access to printing on your computer. See Chapter 14 for information on configuring your firewall.

  • Enable LPD-style printing - Certain applications may require an older LPD-style printing service in order to print on your shared printer. To enable LPD-style printing on your CUPS server, you must turn on the cups-lpd service. As root user, type chkconfig cups-lpd on . Then restart the xinetd daemon ( service xinetd restart ). (To use this service, you may need to install the cups-lpd package.)

  • Check names and addresses - Make sure that you entered your computer's name and print queue properly when you configured it on the other computer. Try using the IP address instead of the hostname (if that worked, it would indicate a DNS name resolution problem). Running a tool such as ethereal can let you watch where the transaction fails.

Access changes to your shared printer are made in the /etc/cups/cupsd.conf file.

Configuring a Shared Samba Printer

Your Linux printers can be configured as shared SMB printers. To share your printer as a Samba (SMB) printer, all you need to do is configure basic Samba server settings as described in Chapter 18. All your printers should be shared on your local network by default. The next section shows what the resulting settings look like and how you might want to change them.

Understanding smb.conf for Printing

When you configure Samba, as described in Chapter 18, the /etc/samba/smb.conf file is configured to allow all your configured printers to be shared. Here are a few lines you might find in the [global] and [printers] sections of the smb.conf file that relate to printer sharing:

 [global] workgroup = MYGROUP serverstring = Samba Server security = share printcap name = /etc/printcap load printers = yes printing = cups encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd unix password sync = Yes [printers] comment = All Printers path = /var/spool/samba guest ok = yes browseable = no writeable = no printable = yes 

The settings shown resulted from configuring Samba from the Samba Server Configuration (System Administration Server Settings Samba) window. In this case, I selected to use encrypted passwords. The lines show that printers from /etc/printcap were loaded and that the CUPS service is being used. The /etc/samba/smbpasswd file stores the encrypted passwords. Because password sync is on, each user's Samba password is synchronized with the local UNIX password for the user.

The last few lines shown here make up the [printers] section, which determines the defaults for how printers are shared in Samba. The final line ( printable = yes) defines that users can print to all printers.

Setting Up SMB Clients

Chances are good that if you are configuring a Samba printer on your Linux computer, you will want to share it with Windows clients. If Samba is set up properly on your computer, and the client computers can reach you over the network, finding and using your printer should be fairly straightforward.

The first place a client computer should look for your shared Samba printer is in Network Neighborhood (or My Network Places, for Windows 2000 and XP). From the Windows 9 x desktop, double-click the Network Neighborhood icon. (From Windows 2000 or XP, double-click the My Network Places icon.) The name of your host computer (the NetBIOS name, which is probably also your TCP/IP name) should appear on the screen or within a workgroup folder on the screen. Open the icon that represents your computer. The window that opens should show your shared printers and folders.

If your computer's icon doesn't appear in Network Neighborhood or My Network Places, try using the Search window. From Windows XP, choose Start Search Computer or People.

Type your computer's name into the Named box and click Search. If the Search window finds your computer, double-click it. A window displaying the shared printers and folders from your computer appears. Figure 17-5 shows the results of a search for a computer in Windows XP.

image from book
Figure 17-5: Find and display your Samba printer from Find - Computer.

After your shared printer appears in the window, the client can configure a pointer to that printer by opening (double-clicking) the printer icon. You should see a message telling you that you must set up the printer before you can use it. Click Yes to proceed to configure the printer for local use. The Add Printer Wizard appears. Answer the questions about how you intend to use the printer, and add the appropriate drivers. When you are done, the printer will appear in your printer window. It can now be selected as the printer for any application program in Windows.

Another way to configure an SMB printer from a Windows operating system is to go to Start Settings Printers. Open the Add Printer icon, and then select Network Printer from the first window. Open the Add Printer icon. Then, follow the instructions to add a printer from the network.




Fedora 6 and Red Hat Enterprise Linux Bible
Fedora 6 and Red Hat Enterprise Linux Bible
ISBN: 047008278X
EAN: 2147483647
Year: 2007
Pages: 279

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