Table Of Contents
Using the Print Utilities to Troubleshoot and Fix Samba Driver Installation Problems
Released: December 28, 2006, OL-12274-01
The Cisco WAAS and Cisco WAFS software products use a combination of technologies to allow Windows clients to print, including Samba suite, CUPS, and proprietary Cisco code. Samba offers a Windows-compatible print server solution that runs on a Linux platform. Although most drivers are compatible with Samba, as well as with all of the Microsoft Windows Hardware Quality Labs (WHQL)-signed drivers, there are some discrepancies, and some drivers are not fully compatible with Samba.
This document explains how to troubleshoot and fix many common Samba print driver installation problems using the print utilities tool developed by Cisco. This document contains the following sections:
Note If the print utilities do not solve your problem, or if you need additional support related to these utilities, see the "Obtaining Documentation and Submitting a Service Request" section.
You can use the Cisco print utilities after you have discovered a printing problem, such as a print form is missing, duplex printing is not available, or the job will not spool.
Note These troubleshooting utilities do not handle drivers that fail during the installation process itself.
To run the Cisco print utilities, note the following:
•We recommend that the Samba print server be accessible over the LAN.
•You must first successfully install a print driver on the Samba print server using the Add Printer Wizard.
•You must have the same printer installed on both the Samba print server and on a local Windows print server. (The Cisco print utilities must be run from a Windows client machine that has the same driver installed locally.)
•The troubleshooting utilities run on Windows XP and Windows 2003 clients.
•The troubleshooting utilities can fix problems for Windows 2000 and later versions of print drivers only. These troubleshooting utilities are not intended to work for Windows NT or Windows 98 print drivers.
The Cisco print utilities include the following two utilities that run on a Windows XP or Windows 2003 client:
Note When you use these utilities, no changes are made to the Windows client machine that runs the print_diff or print_fix utilities. Modifications are made to the Samba print server only.
The Cisco print utilities tool has three objectives:
•Identify problems in a driver installation by comparing the driver setup on Samba to the Windows driver installation that is mapped to a local Windows client printing port.
•Provide reports on driver installation problems to shorten the debugging process.
•Resolve many common problems that occur when Windows print drivers are installed on the Samba print server.
This tool facilitates print driver troubleshooting and resolves some common installation problems; however, some drivers are incompatible with Samba. For example, Fiery Drivers incorporated into some printer manufacturer solutions are not compatible with Samba. Other multifunction printers (MFPs) may also have limited functionality when working with Samba and are not supported by WAAS. Certain print drivers with complex features, such as sophisticated paper handling, may not be compatible with the WAAS software.
For information about how to determine if a print driver is compatible with your software, see the "WAAS Print Driver Support and Interoperability" section at the following URL: http://www.cisco.com/en/US/products/ps6870/prod_release_notes_list.html
This section contains the following information about the print_diff utility:
The print_diff utility extracts the print driver properties from the Windows client machine and the Samba print server and compares the two for any differences. The print_diff utility retrieves the following information:
•Print forms (EnumForms)
•Printer device DEV MODE (DocumentProperties)
•Print processors (EnumPrintProcessors)—Samba does not support EMF printing, so the utility only notifies about the print processors that are supported.
•Set of driver-specific registry keys and their corresponding values (EnumPrinterKey, EnumPrinterDataEx)
The print_diff utility verifies the driver installation on the Samba print server. If the driver failed to install on the Samba print server, if the Samba and Windows print servers do not include the same driver, or if the Windows printer is not using the WinPrint processor, the utility exits with an error message. (See Example 1.)
All data that is retrieved from the two print queues is saved in .csv formatted files that can be compared using Excel or a text editor. You will have one output file for the Windows client machine and one for the Samba print server. The output files are saved in the same directory as the print utility. (See the "Sample Output" section.)
Command Line Syntax
Use the following command line syntax to run the print_diff utility:
print_diff --winprint <windows_local_printer_name>
print_diff --sambaprint <\\print_server_name\samba_queue_name>
The print_diff command can be entered as a single line as follows:print_diff --winprint <windows_local_printer_name> --sambaprint <\\print_server_name\samba_queue_name>
Table 1 describes the argument variables for print_diff.
Example 1 Print Diff Error Message
In this example, the print_diff utility discovers that the printer name for the Samba printer is not valid and displays this error message:print_diff.exe --winprint "HP LaserJet 2420 PS" --sambaprint \\10.56.70.119\hp_2420psUnable to open samba printer: \\10.56.70.119\hp_2420psERROR: [0x709], The printer name is invalid.Failed to execute print_diff!
Example 2 Print Diff Success
In this example, the print_diff utility successfully compares the driver setup on the Samba server to the Windows driver installation and provides the following report:print_diff.exe --winprint "HP LaserJet 2420 PS" --sambaprint \\10.56.70.119\hp_2420ps... [WatermarkPool:4] value under [HPPresetRoot\WatermarkPoolData] Key [WatermarkPool:3] value under [HPPresetRoot\WatermarkPoolData] Key [WatermarkPool:2] value under [HPPresetRoot\WatermarkPoolData] Key [WatermarkPool:1] value under [HPPresetRoot\WatermarkPoolData] Key [WatermarkPool:0] value under [HPPresetRoot\WatermarkPoolData] Key [PresetPool:1] value under [HPPresetRoot\PresetPoolData] Key [PresetPool:0] value under [HPPresetRoot\PresetPoolData] Key [PresetPoolMaxIndexCount] value under [HPPresetRoot] Key [HPRestrictedUserGuid] value under [HPPresetRoot] Key [flags] value under [DsSpooler] Key [url] value under [DsSpooler] Key [printShareName] value under [DsSpooler] Key--------------------------------------------------------------------------------In total Samba print server doesn't support  registry Values supported by Windows print server--------------------------------------------------------------------------------Samba print server supports all [HP LaserJet 2420 PS] Windows print queue formsprint_diff finished successfully!
When you enter two printers as command-line arguments, all differences in supported Windows print forms (if any) are displayed in the Windows cmd console. In addition, a standard CSV formatted file that contains all of the retrieved data (such as, all possible forms, registry keys, and printer device properties) is created for each printer (Samba and Windows) and is saved in the same directory as the print utility. The CSV output files use the naming convention, print_server_name_queue_name.csv. For example, the CSV filenames for the two printers in the previous examples would be as follows:
The CSV output file contains output similar to the following;DEVMODE valuesDevice NameSPEC Version 1025Driver Version 296DEVMODE structure size 156Private driver data 3868Initialized DEVMODE members 58785551Paper orientation 1Paper size to print 1Custom paper length 2794Custom paper width 2159Paper scale factor 100Number of copies to be printed 1Paper source 1025Printer x-resolution 600Color or monochrome 2Duplex or one sided 1Printer y-resolution 600TrueType fonts 2Use collate 1Form name to usePixels per logical inch 0Color resolution in bits per pixel of the display device 0Width in pixels of the visible device surface 0Height in pixels of the visible device surface 0Frequency 0Type of media being printed 256Dithering 0
You can compare the output for the Windows printer with the output for the Samba printer by opening the CSV files in Excel and viewing the files side by side (Window > Compare Side by Side).
For example, Figure 1 shows a sample of the print_diff output for an Adobe printer on the Windows print server (AdobePS_CXP35_V2_.csv) and the print_diff output for the same printer on the Samba print server (wae-r34-512-14_adobe_.csv) and compares them side by side using Excel.
Note The print_diff command uses the printer name as the argument. However, as shown in this example, if you create a printer in the Windows print server without specifying a printer name, Windows by default uses the driver name as the printer name. If you did not specify a printer name in the Windows print server, the printer name that you must use as the argument for the print_diff command will be the driver name. This name also becomes part of the output filename.
Figure 1 Comparing the Print Diff Output
This section contains the following information about the print_fix utility:
Installing a print driver on a Samba print server can sometimes result in inaccuracies in the installed forms and registry keys. The print_fix utility resolves many inaccuracies that occur when the Samba print server fails to read the Windows driver information correctly.
The print_fix utility resolves any differences between the two sets of print driver properties. The print_fix utility also updates the registry keys in Samba and restores the missing print functionality.
The following data is completed by the print_fix utility:
•Driver forms (AddForm)—Any form found on the Windows print server and not found on the Samba print server is added to the Samba TDB (Temporary DataBase) files using AddForm.
•Missing or incomplete print driver configuration registry keys (print driver-specific configuration data) (SetPrinterData or/and SetPrinterDataEx).
•All keys under the Printer DSDriver Key (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\print_driver_name).
Command Line Syntax
Use the following command line syntax to run the print_fix utility:
print_fix --winprint <windows_local_printer_name>
[--command <FORMS | KEYS>]
The print_fix command can be entered as a single line, as follows:print_fix --winprint <windows_local_printer_name> --sambaprint <\\print_server_name\samba_queue_name>
Table 2 describes the argument variables for print_fix.
Example 3 Print Fix Error Message
In this example, the print_fix utility discovers that the printer name for the Samba printer is not valid and displays this error message:print_fix.exe --winprint "HP LaserJet 2420 PS" --sambaprint " "Unable to open samba printer:ERROR: [0x709], The printer name is invalid.Failed to execute print_fix!
Example 4 Print Fix Success
In this example, the utility successfully adds the missing printer or user-specific forms:print_fix.exe -winprint "HP LaserJet 2420 PS" --sambaprint \\10.56.70.119\hp_2420ps...[Custom 17][Custom 18][Custom 19][Custom 20][Letter (8.5 x 11 in)][Folio (8.5 x 13 in)][Legal (8.5 x 14 in)][Executive (7.25 x 10.5 in)][Hagaki Card 100 x 148 mm][8.5x13][8.5+13][8.5x11 LEF][8.5x11 SEF]--------------------------------------------------------------------------------Successfully added  printer or user specific formsSuccessfully added  builtin forms--------------------------------------------------------------------------------print_fix finished successfully!
Troubleshooting includes the following topics:
Before you run the print utilities, try to fix the printing problem by changing one of the print properties, such as the paper orientation (or some other print property). Apply the change, and then change the property back and apply the change. Test the printer. If the printer still fails to print, run the print utilities.
To change printing or driver properties, follow these steps:
Step 1 In the Settings menu, choose Printers and Faxes and the name of the printer that is having the problem.
Step 2 In the printer queue window, choose Printer > Properties > Advanced:
•The driver properties are found under the Advanced tab.
•The page orientation is found by clicking Printing Defaults.
Step 3 Change the paper orientation or one of the driver properties, and click Apply.
Using the Print Utilities
To troubleshoot print driver problems using the Cisco print utilities, follow these steps:
Step 1 Install the same print driver that you installed on the Samba print server on a local Windows XP or 2003 print server. (You must have administrative privileges for installing print drivers locally.)
The Cisco print utilities must be run from a Windows client machine that has the same driver installed locally.
Step 2 Check to make sure that the driver on the Samba print server is initialized.
Step 3 Connect to the Samba print server as follows:
•From the Windows client command line shell (cmd), connect to the Samba print server with administrative privileges by using the net use command, as shown in the following example:net use \\<Samba_print_server_name>\print$ * /USER:<admin_user>
•When prompted, enter the admin user's password, where admin_user and admin_user's password are accounts that were created in the AAA section of WAAS Central Manager.
Note If you are using a WAFS system, then the admin user is one of the Print Admin group users defined in the Active Directory (AD).
Step 4 Install the print_diff and print_fix utilities on the Windows client machine:
a. Using FTP, transfer the Print Utilities.zip file from the Cisco.com software download site to the Windows client machine.
b. Create a subdirectory in the Windows client C:\ drive, and name it PrintUtils, for example.
c. Unzip the Print Utilities.zip file by extracting the two utility files, print_diff.exe and print_fix.exe, to the C:\PrintUtils directory.
d. Run the utilities from the PrintUtils directory.
Step 5 To run the print_diff utility, use the print_diff command as shown in the following example:print_diff --winprint "Brother HL-5170DN series" --sambaprint "\\prn_srv_305\Brother"
Step 6 To run the print_fix utility, use the print_fix command as shown in the following example:print_fix --winprint "Brother HL-5170DN series" --sambaprint \\prn_srv_305\Brother --command "KEYS"
Caution Before you attempt to run the print_fix utility, you must force the Samba print server to recognize that the driver exists. Otherwise, the print_fix utility does not fix the driver problem. To do this step, change one of the driver properties and apply the change. (See the "Preliminary Tasks" section.)
Change the property back to its original setting, and apply the change. Test the printer. If the printer still fails to print, run the print_fix utility.
Step 7 After you run the print_fix utility, close all open Windows Explorer connections to the Samba print server by using the following command:net use \\<Samba_print_server_name>\print$ * /delete
(This step applies to WAAS systems only.)
Step 8 Reconnect to the Samba print server using Windows Explorer, and proceed to Printers and Faxes.
Make sure that the printer you installed is showing in the list of printers and that you can successfully connect to it for printing.
Step 9 To verify that all missing properties have been added to the Samba print server, you can run the print_diff utility again. You must then test the print driver to verify that missing driver functionality has been restored.
Obtaining Documentation and Submitting a Service Request
For information on obtaining documentation, submitting a service request, and gathering additional information, see the monthly What's New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation, at:
Subscribe to the What's New in Cisco Product Documentation as a Really Simple Syndication (RSS) feed and set content to be delivered directly to your desktop using a reader application. The RSS feeds are a free service and Cisco currently supports RSS version 2.0.
Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at www.cisco.com/go/trademarks. Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R)
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
Using the Print Utilities to Troubleshoot and Fix Samba Driver Installation Problems
© 2006-2010 Cisco Systems, Inc. All rights reserved.