Adding a Printer to a Samba PDC





Adding a Printer to a Samba PDC

Sharing printers amongst all your PCs is one of the advantages of creating a home network. Here's how to connect your printer directly to your PDC. Not only does this method make your printer available to all your Windows workstations, it also makes your Samba PDC a print server! The only potential snag is that you need the Windows printer driver loaded on every client machine. This may be okay for a small home network but impractical for a huge corporate network.

Adding the Printer to Linux

By far, the easiest way to add a printer in Linux is to use one of the many menu-based printer utilities available. For the example, I'll use system-config-printer (Figure), which is easy to find and can be accessed from the command line:

     [[email protected] tmp]# system-config-printer

1. Printer configuration screen.


Note

Sometimes the graphics in system-config-printer don't work as expected due to your environment variables. You can temporarily set the required variable to the correct output with the command

     [[email protected] tmp]# env LANG=C system-config-printer


Assuming your printer is locally attached to the parallel port, here are the steps to use:

1.
Using the Tab key, move to the New button and press the Enter key.

2.
When the Create a New Queue menu appears, give the printer a name that's easy to remember, select Local Printer Device, and move to the "next" button before pressing Enter.

3.
From the resulting Setting Up Local Printer Device menu, select /dev/lp0, assuming the printer is on the parallel port as opposed to the USB port. Click the Next button to go to the Queue Driver menu.

4.
Scroll to your manufacturer's entry, press Enter. Scroll further to your model, and press Enter again. You'll now get a choice of drivers, select the default device, which is marked with an asterisk. Click Next to go to the Create a New Queue confirmation menu.

5.
Move to the Finish button, and press Enter. There will be a slight delay.

At this stage, it's wise to do a test print to make sure all is okay.

Make Samba Aware of the Printer

The easiest way to let Samba know the printer is available is via the Samba SWAT Web interface. Once you are in SWAT:

1.
Click the Printers button.

2.
Find your printer in the pull-down menu. If the printer name has an asterisk beside it, it has been auto-configured by Samba. It might not be visible on your network, however, if Samba hasn't been restarted since creating the printer. If this is the case, restart Samba. You can now skip ahead to the "Configure the Printer Driver on the Workstations" section.

3.
If Samba did not auto-configure your printer, you need to edit or create it yourself. Click on the Commit Changes button to create an updated /etc/samba/smb.conf file.

4.
Click on the Status tab at the top of the screen, and restart smbd and nmbd to restart Samba.

Your printer will now be available for use by all Windows workstations.

Configure the Printer Driver on the Workstations

With the printer ready to go on the Linux side, you now need to prepare things in Windows.

1.
Download the appropriate Windows printer driver from the manufacturer and install it.

2.
Go to the Add Printer menu. Click the Next button.

3.
Select the Network Printer button to access the Local or Network Printer menu. Click the Next button, again.

4.
You now should be on the Locate Your Printer menu. Don't enter a name, instead click Next so you can browse for your printer.

5.
From the Browse for Printer menu, double-click on the name of your Linux Samba server. You should see the new printer. Click on the printer name, then click Next.

6.
You may get the message "The server on which the printer resides does not have the correct printer driver installed. If you want to install the driver on your local computer, click OK." Fortunately, you pre-installed the driver. Click the OK button.

7.
When the Add Printer Wizard appears, select the manufacturer of your printer, select the printer model, and then click OK.

8.
The Add Printer Wizard will ask you whether you want to use this new printer as the default printer. Select Yes or No depending on your preference. Click the Next button

9.
From the resulting Completing the Add Printer Wizard menu, click the Finish button.

The new printer should now show up on the Windows Printers menu in the Control Panel. Send a test print, to be sure all is well.


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows