Adding a Samba (SMB) Printer

To add printer which is accessed using the SMB protocol, click the Add button in the main printconf window. The window shown in Figure 13-2 will appear. Enter a unique name for the printer in the Queue Name text field. This can be any descriptive name for your printer. You can also create any alias names for the printer by clicking the Add button beside the Aliases list. Refer to the section called Creating Printer Aliases for more information about aliases. The printer name and aliases cannot contain spaces and must begin with a letter a through z or A through Z. The valid characters are a through z, A through Z, 0 through 9, -, and _.

Click Queue Type from the left side menu and choose Windows Printer (SMB Share) from the Queue Type menu. If the printer is attached to a Microsoft Windows system, choose this queue type.

Text fields for the following options appear below the Queue Type menu as shown in Figure 13-5:

Click the Translate \n => \r\n button to translate the end of line characters to a form that is readable by a Microsoft Windows system.

Figure 13-5. Adding a SMB Printer

Next, select the type of printer that is connected to the remote SMB system from the left side list by clicking Printer Driver from the left side menu. After choosing the manufacturer and model number of the printer, a list of drivers will appear. If there is more than one driver for the printer, choose the preferred driver in the Printer Driver list. If you are not sure which one to use, do not change this value. Click the Printer Notes button to view notes about the printer driver from the Linux Printing Database. Click OK.

Click Driver Options from the left side menu after selecting a printer driver. These options will vary depending on the printer driver that you selected. Typical options include paper size, print quality, and printer resolution.

Click the Apply button in the main window to save your changes to the /etc/printcap configuration file and restart the printer daemon (lpd). After applying the changes, print a test page to ensure the configuration is correct. Refer to the section called Printing a Test Page for details.


If you require a username and password for an SMB (LAN Manager) or NCP (NetWare) print queue, they are stored unencrypted in a local script, Thus, it is possible for another person to learn the username and password. To avoid this, the username and password to use the printer should be different from the username and password used for the user's account on the local Red Hat Linux system. If they are different, then the only possible security compromise would be unauthorized use of the printer. If there are file shares from the SMB server, it is recommended that they also use a different password than the one for the print queue.