Your driver is installed. It is now ready for Point'n'Print installation by the clients . You may have tried to download and use it onto your first client machine, but wait. Let's make sure you are acquainted first with a few tips and tricks you may find useful. For example, suppose you did not set the defaults on the printer, as advised in the preceding paragraphs. Your users complain about various issues (such as, " We need to set the paper size for each job from Letter to A4 and it will not store it .")
17.8.1 Setting Default Print Options for Client Drivers
The last sentence might be viewed with mixed feelings by some users and admins. They have struggled for hours and could not arrive at a point where their settings seemed to be saved. It is not their fault. The confusing thing is that in the multi-tabbed dialog that pops up when you right-click on the printer name and select Properties , you can arrive at two dialogs that appear identical, each claiming that they help you to set printer options in three different ways. Here is the definite answer to the Samba default driver setting FAQ:
How are you doing it? I bet the wrong way. (It is not easy to find out, though). There are three different ways to bring you to a dialog that seems to set everything. All three dialogs look the same, but only one of them does what you intend. You need to be Administrator or Print Administrator to do this for all users. Here is how I reproduce it in an XP Professional:
Do you see any difference in the two settings dialogs? I do not either. However, only the last one, which you arrived at with steps C.1 through 6 will permanently save any settings which will then become the defaults for new users. If you want all clients to have the same defaults, you need to conduct these steps as administrator ( printer admin in) before a client downloads the driver (the clients can later set their own per-user defaults by following procedures A or B above). Windows 200x/XP allow per-user default settings and the ones the administrator gives them, before they set up their own. The parents of the identically-looking dialogs have a slight difference in their window names ; one is called Default Print Values for Printer Foo on Server Bar" (which is the one you need) and the other is called " Print Settings for Printer Foo on Server Bar ". The last one is the one you arrive at when you right-click on the printer and select Print Settings... . This is the one that you were taught to use back in the days of Windows NT, so it is only natural to try the same way with Windows 200x/XP. You would not dream that there is now a different path to arrive at an identically looking, but functionally different, dialog to set defaults for all users.
17.8.2 Supporting Large Numbers of Printers
One issue that has arisen during the recent development phase of Samba is the need to support driver downloads for hunderds of printers. Using Windows NT APW here is somewhat awkward (to say the least). If you do not want to acquire RSS pains from the printer installation clicking orgy alone, you need to think about a non-interactive script.
If more than one printer is using the same driver, the rpcclient setdriver command can be used to set the driver associated with an installed queue. If the driver is uploaded to [print$] once and registered with the printing TDBs, it can be used by multiple print queues. In this case, you just need to repeat the setprinter subcommand of rpcclient for every queue (without the need to conduct the adddriver repeatedly). The following is an example of how this could be accomplished:
root# rpcclient SAMBA-CUPS -U root%secret -c 'enumdrivers' cmd = enumdrivers [Windows NT x86] Printer Driver Info 1: Driver Name: [ infotec IS 2075 PCL 6] Printer Driver Info 1: Driver Name: [DANKA InfoStream] Printer Driver Info 1: Driver Name: [Heidelberg Digimaster 9110 (PS)] Printer Driver Info 1: Driver Name: [dm9110] Printer Driver Info 1: Driver Name: [mydrivername] [....] root# rpcclient SAMBA-CUPS -U root%secret -c 'enumprinters' cmd = enumprinters flags:[0x800000] name:[\\SAMBA-CUPS\dm9110] description:[\\SAMBA-CUPS\dm9110,,110ppm HiVolume DANKA Stuttgart] comment:[110 ppm HiVolume DANKA Stuttgart] [....] root# rpcclient SAMBA-CUPS -U root%secret -c \ 'setdriver dm9110 "Heidelberg Digimaster 9110 (PS)"' cmd = setdriver dm9110 Heidelberg Digimaster 9110 (PPD) Successfully set dm9110 to driver Heidelberg Digimaster 9110 (PS). root# rpcclient SAMBA-CUPS -U root%secret -c 'enumprinters' cmd = enumprinters flags:[0x800000] name:[\\SAMBA-CUPS\dm9110] description:[\\SAMBA-CUPS\dm9110,Heidelberg Digimaster 9110 (PS),\ 110ppm HiVolume DANKA Stuttgart] comment:[110ppm HiVolume DANKA Stuttgart] [....] root# rpcclient SAMBA-CUPS -U root%secret -c 'setdriver dm9110 mydrivername' cmd = setdriver dm9110 mydrivername Successfully set dm9110 to mydrivername. root# rpcclient SAMBA-CUPS -U root%secret -c 'enumprinters' cmd = enumprinters flags:[0x800000] name:[\\SAMBA-CUPS\dm9110] description:[\\SAMBA-CUPS\dm9110,mydrivername,\ 110ppm HiVolume DANKA Stuttgart] comment:[110ppm HiVolume DANKA Stuttgart] [....]
It may not be easy to recognize that the first call to enumprinters showed the " dm9110 " printer with an empty string where the driver should have been listed (between the 2 commas in the description field). After the setdriver command succeeded, all is well.
17.8.3 Adding New Printers with the Windows NT APW
By default, Samba exhibits all printer shares defined in smb.conf in the Printers folder. Also located in this folder is the Windows NT Add Printer Wizard icon. The APW will be shown only if:
The APW can do various things:
The last one (add a new printer) requires more effort than the previous ones. To use the APW to successfully add a printer to a Samba server, the add printer command must have a defined value. The program hook must successfully add the printer to the UNIX print system (i.e., to /etc/printcap , /etc/cups/printers.conf or other appropriate files) and to smb.conf if necessary.
When using the APW from a client, if the named printer share does not exist, smbd will execute the add printer command and reparse to the to attempt to locate the new printer share. If the share is still not defined, an error of Access Denied is returned to the client. The add printer command is executed under the context of the connected user, not necessarily a root account. A map to guest = bad user may have connected you unwittingly under the wrong privilege. You should check it by using the smbstatus command.
17.8.4 Error Message: " Cannot connect under a different Name "
Once you are connected with the wrong credentials, there is no means to reverse the situation other than to close all Explorer Windows, and perhaps reboot.
So you close all connections. You try again. You get the same message. You check from the Samba side, using smbstatus . Yes, there are more connections. You kill them all. The client still gives you the same error message. You watch the smbd.log file on a high debug level and try reconnect . Same error message, but not a single line in the log. You start to wonder if there was a connection attempt at all. You run ethereal and tcpdump while you try to connect. Result: not a single byte goes on the wire. Windows still gives the error message. You close all Explorer windows and start it again. You try to connect and this times it works! Windows seems to cache connection information somewhere and does not keep it up-to-date (if you are unlucky you might need to reboot to get rid of the error message).
17.8.5 Take Care When Assembling Driver Files
You need to be extremely careful when you take notes about the files and belonging to a particular driver. Don't confuse the files for driver version " " (for Windows 9x/Me, going into [print$]/WIN/0/ ), driver version 2 (Kernel Mode driver for Windows NT, going into [print$]/W32X86/2/ may be used on Windows 200x/XP also), and driver version " 3 " (non-Kernel Mode driver going into [print$]/W32X86/3/ cannot be used on Windows NT). Quite often these different driver versions contain files that have the same name but actually are very different. If you look at them from the Windows Explorer (they reside in %WINDOWS%\system32\spool\drivers\W32X86\ ), you will probably see names in capital letters , while an enumdrivers command from Samba would show mixed or lower case letters. So it is easy to confuse them. If you install them manually using rpcclient and subcommands, you may even succeed without an error message. Only later, when you try install on a client, you will encounter error messages like This server has no appropriate driver for the printer .
Here is an example. You are invited to look closely at the various files, compare their names and their spelling, and discover the differences in the composition of the version 2 and 3 sets. Note: the version 0 set contained 40 Dependentfiles , so I left it out for space reasons:
root# rpcclient -U 'Administrator%secret' -c 'enumdrivers 3' 10.160.50.8 Printer Driver Info 3: Version:  Driver Name: [Canon iR8500 PS3] Architecture: [Windows NT x86] Driver Path: [\\10.160.50.8\print$\W32X86\3\cns3g.dll] Datafile: [\\10.160.50.8\print$\W32X86\3\iR8500sg.xpd] Configfile: [\\10.160.50.8\print$\W32X86\3\cns3gui.dll] Helpfile: [\\10.160.50.8\print$\W32X86\3\cns3g.hlp] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\aucplmNT.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\ucs32p.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\tnl32.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\aussdrv.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cnspdc.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\aussapi.dat] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cns3407.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\CnS3G.cnt] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\NBAPI.DLL] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\NBIPC.DLL] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcview.exe] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcdspl.exe] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcedit.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcqm.exe] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcspl.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cfine32.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcr407.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\Cpcqm407.hlp] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcqm407.cnt] Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cns3ggr.dll] Monitorname:  Defaultdatatype:  Printer Driver Info 3: Version:  Driver Name: [Canon iR5000-6000 PS3] Architecture: [Windows NT x86] Driver Path: [\\10.160.50.8\print$\W32X86\2\cns3g.dll] Datafile: [\\10.160.50.8\print$\W32X86\2\IR5000sg.xpd] Configfile: [\\10.160.50.8\print$\W32X86\2\cns3gui.dll] Helpfile: [\\10.160.50.8\print$\W32X86\2\cns3g.hlp] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\AUCPLMNT.DLL] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\aussdrv.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\cnspdc.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\aussapi.dat] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\cns3407.dll] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\CnS3G.cnt] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\NBAPI.DLL] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\NBIPC.DLL] Dependentfiles: [\\10.160.50.8\print$\W32X86\2\cns3gum.dll] Monitorname: [CPCA Language Monitor2] Defaultdatatype: 
If we write the " version 2 " files and the " version 3 " files into different text files and compare the result, we see this picture:
root# sdiff 2-files 3-files cns3g.dll cns3g.dll iR8500sg.xpd iR8500sg.xpd cns3gui.dll cns3gui.dll cns3g.hlp cns3g.hlp AUCPLMNT.DLL aucplmNT.dll > ucs32p.dll > tnl32.dll aussdrv.dll aussdrv.dll cnspdc.dll cnspdc.dll aussapi.dat aussapi.dat cns3407.dll cns3407.dll CnS3G.cnt CnS3G.cnt NBAPI.DLL NBAPI.DLL NBIPC.DLL NBIPC.DLL cns3gum.dll cpcview.exe > cpcdspl.exe > cpcqm.exe > cpcspl.dll > cfine32.dll > cpcr407.dll > Cpcqm407.hlp > cpcqm407.cnt > cns3ggr.dll
Do not be fooled! Driver files for each version with identical names may be different in their content, as you can see from this size comparison:
root# for i in cns3g.hlp cns3gui.dll cns3g.dll; do \ smbclient //10.160.50.8/print\$ -U 'Administrator%xxxx' \ -c "cd W32X86/3; dir $i; cd .. ; cd 2; dir $i"; \ done CNS3G.HLP A 122981 Thu May 30 02:31:00 2002 CNS3G.HLP A 99948 Thu May 30 02:31:00 2002 CNS3GUI.DLL A 1805824 Thu May 30 02:31:00 2002 CNS3GUI.DLL A 1785344 Thu May 30 02:31:00 2002 CNS3G.DLL A 1145088 Thu May 30 02:31:00 2002 CNS3G.DLL A 15872 Thu May 30 02:31:00 2002
In my example were even more differences than shown here. Conclusion: you must be careful to select the correct driver files for each driver version. Don't rely on the names alone and don't interchange files belonging to different driver versions.
17.8.6 Samba and Printer Ports
Windows NT/2000 print servers associate a port with each printer. These normally take the form of LPT1: , COM1: , FILE: , and so on. Samba must also support the concept of ports associated with a printer. By default, only one printer port, named " Samba Printer Port ", exists on a system. Samba does not really need such a " port " in order to print; rather it is a requirement of Windows clients. They insist on being told about an available port when they request this information, otherwise they throw an error message at you. So Samba fakes the port information to keep the Windows clients happy.
Samba does not support the concept of Printer Pooling internally either. Printer Pooling assigns a logical printer to multiple ports as a form of load balancing or fail over.
If you require multiple ports be defined for some reason or another (my users and my boss should not know that they are working with Samba), configure enumports command which can be used to define an external program that generates a listing of ports on a system.
17.8.7 Avoiding Common Client Driver Misconfiguration
So now the printing works, but there are still problems. Most jobs print well, some do not print at all. Some jobs have problems with fonts, which do not look good. Some jobs print fast and some are dead-slow. We cannot cover it all, but we want to encourage you to read the brief paragraph about " Avoiding the Wrong PostScript Driver Settings " in the CUPS Printing part of this document.