Guest

Cisco Wide Area Application Services (WAAS) Software

Using the Print Utilities to Troubleshoot and Fix Samba Driver Installation Problems

  • Viewing Options

  • PDF (469.7 KB)
  • Feedback
Using the Print Utilities to Troubleshoot and Fix Samba Driver Installation Problems

Table Of Contents

Using the Print Utilities to Troubleshoot and Fix Samba Driver Installation Problems

Requirements

Overview

Print_Diff Utility

Functional Description

Command Line Syntax

Examples

Sample Output

Print_Fix Utility

Functional Description

Command Line Syntax

Examples

Troubleshooting

Preliminary Tasks

Using the Print Utilities

Obtaining Documentation and Submitting a Service Request


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:

Requirements

Overview

Troubleshooting

Obtaining Documentation and Submitting a Service Request


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.


Requirements

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.

Overview

The Cisco print utilities include the following two utilities that run on a Windows XP or Windows 2003 client:

Print_Diff Utility

Print_Fix Utility


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

Print_Diff Utility

This section contains the following information about the print_diff utility:

Functional Description

Command Line Syntax

Examples

Sample Output

Functional Description

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.

Table 1 Print_Diff Argument Variable Descriptions

Argument
Description

--winprint <windows_local_printer_name>

Windows printer name on the local Windows client machine.

To obtain this data do the following:

From the Windows client machine, choose Start > Settings > Printers and Faxes. Right click on the desired printer name, and then choose Properties.

--sambaprint <\\print_server_name\samba_queue_name>

NetBIOS name of the Samba print server and the printer queue_name.


Examples

Example 1 and Example 2 show the command line and examples of a failed attempt and a successful completion of the print_diff utility.

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_2420ps
Unable to open samba printer: \\10.56.70.119\hp_2420ps
ERROR: [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
.
.
.
[161] [WatermarkPool:4] value under [HPPresetRoot\WatermarkPoolData] Key
[162] [WatermarkPool:3] value under [HPPresetRoot\WatermarkPoolData] Key
[163] [WatermarkPool:2] value under [HPPresetRoot\WatermarkPoolData] Key
[164] [WatermarkPool:1] value under [HPPresetRoot\WatermarkPoolData] Key
[165] [WatermarkPool:0] value under [HPPresetRoot\WatermarkPoolData] Key
[166] [PresetPool:1] value under [HPPresetRoot\PresetPoolData] Key
[167] [PresetPool:0] value under [HPPresetRoot\PresetPoolData] Key
[168] [PresetPoolMaxIndexCount] value under [HPPresetRoot] Key
[169] [HPRestrictedUserGuid] value under [HPPresetRoot] Key
[170] [flags] value under [DsSpooler] Key
[171] [url] value under [DsSpooler] Key
[172] [printShareName] value under [DsSpooler] Key
--------------------------------------------------------------------------------
In total Samba print server doesn't support [172] registry Values supported by Windows 
print server
--------------------------------------------------------------------------------
Samba print server supports all [HP LaserJet 2420 PS] Windows print queue forms
print_diff finished successfully!

Sample Output

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:

HP_LaserJet_2420_PS_.csv

10_56_70_119_hp_2420_ps_.csv

The CSV output file contains output similar to the following;

DEVMODE values
Device Name
SPEC Version 1025
Driver Version 296
DEVMODE structure size 156
Private driver data 3868
Initialized DEVMODE members 58785551
Paper orientation 1
Paper size to print 1
Custom paper length 2794
Custom paper width 2159
Paper scale factor 100
Number of copies to be printed 1
Paper source 1025
Printer x-resolution 600
Color or monochrome 2
Duplex or one sided 1
Printer y-resolution 600
TrueType fonts 2
Use collate 1
Form name to use
Pixels per logical inch 0
Color resolution in bits per pixel of the display device 0
Width in pixels of the visible device surface 0
Height in pixels of the visible device surface 0
Frequency 0
Type of media being printed 256
Dithering 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

Print_Fix Utility

This section contains the following information about the print_fix utility:

Functional Description

Command Line Syntax

Examples

Functional Description

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>

--sambaprint <\\print_server_name\samba_queue_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.

Table 2 Print Fix Argument Variable Descriptions 

Argument
Description

--winprint <windows_local_printer_name>

Windows print queue installed on the local (Windows) print server with the correct print driver already installed and initialized.

--sambaprint <\\print_server_name\samba_queue_name>

Remote print queue installed on the Samba print server with the print driver already installed and initialized.

--command <FORMS | KEYS>

(Optional) If you supply the command argument with a corresponding value for FORMS or KEYS, then only the module specified (FORMS or KEYS) will be corrected by the print_fix utility. By default, when this argument is not specified, the print_fix utility fixes both forms and keys.


Examples

Example 3 shows the command line and an error message for the print_fix utility, and Example 4 shows a successful completion of the print_fix utility.

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 [76] printer or user specific forms
Successfully added [0] builtin forms
--------------------------------------------------------------------------------
print_fix finished successfully!

Troubleshooting

Troubleshooting includes the following topics:

Preliminary Tasks

Using the Print Utilities

Preliminary Tasks

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:

http://www.cisco.com/en/US/docs/general/whatsnew/whatsnew.html

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.