[ Pobierz całość w formacie PDF ]
.For example, here is what you would see ifdebugging information:you left out the path configuration option in the previous example:print command = /bin/cat %s >>/tmp/printlog; rm %s# testparmLoad smb config files from /usr/local/samba/lib/smb.conf or:Processing configuration file "/usr/local/samba/lib/smb.conf"print command = echo "printed %s on %p" >>/tmp/printlogProcessing section "[global]"Processing section "[homes]"A common problem with Samba printer configuration is forgetting to use the fullProcessing section "[data]"pathnames for commands; simple commands often don t work because the guestProcessing section "[printers]"No path in service printers - using /tmp account s PATH doesn t include them.Another frequent problem is not having theLoaded services file OK.correct permissions on the spooling directory.Press enter to see a dump of your service definitionsGlobal parameters:load printers: Yesprintcap name: /etc/printcapDefault service parameters:210 Chapter 7: Printing and Name Resolution Sending Print Jobs to Samba 211the process.If the test printing does work, congratulations! The remote printer willnow be available to all your PC applications through the File and Print menuitems.Automatically Setting Up Printer DriversThe previous section described how to manually configure a printer driver foryour Windows system.As a system administrator, however, you can t always guar-antee that users can perform such a process without making mistakes.Luckily,however, you can ask Samba to automatically set up the printer drivers for a spe-cific printer.Samba has three options that can be used to automatically set up printer driversfor clients who are connecting for the first time.These options are printerdriver, printer driver file, and printer driver location.This sectionFigure 7-5.The Printers windowexplains how to use these options to allow users to skip over the Manufacturerprint from MS-DOS, answer No.Windows should load the appropriate driverdialog in the Add Printer Wizard above.resources from its CD-ROM and ask you if you want to print a test page.Again,respond No and close the Add Printer Wizard dialog.For more information on how to do this, see the PRINTER_DRIVER.TXT file in the Samba distribution documentation.Create a printer definition fileYou can create a printer definition file by using the make_printerdef script in the/usr/local/samba/bin directory.In order to use this script, you need to copy overthe following four files from a Windows client:*There are four major steps:C:\WINDOWS\INF\MSPRINT.INF1.Install the drivers for the printer on a Windows client (the printer need not beC:\WINDOWS\INF\MSPRINT2.INFattached).C:\WINDOWS\INF\MSPRINT3.INF2.Create a printer definition file from the information on a Windows machine.C:\WINDOWS\INF\MSPRINT4.INF3.Create a PRINTER$ share where the resulting driver files can be placed.Once you have the four files, you can create a printer definition file using the4.Modify the Samba configuration file accordingly.appropriate printer driver and its.INF file.If the printer driver starts with the let-ters A K, use either the MSPRINT.INF file or the MSPRINT3.INF file.If it beginsLet s go over each of the four steps in greater detail.with the letters L-Z, use the MSPRINT2.INF file or the MSPRINT4.INF file.You mayneed to grep through each of the files to see where your specific driver is.For theInstall the drivers on a windows clientfollowing example, we have located our driver in MSPRINT3.INF and created aUse Windows 95/98 for this step.It doesn t matter which client you choose, asprinter definition file for a HP DeskJet 560C printer:long as it has the ability to load the appropriate drivers for the printer.In fact, you$grep "HP DeskJet 560C Printer" MSPRINT.INF MSPRINT3.INFdon t even need to have the printer attached to the machine.All you re interestedMSPRINT3.INF: "HP DeskJet 560C Printer"=DESKJETC.DRV,HP_DeskJet_.in here is getting the appropriate driver files into the Windows directory.First, goto the Printers window of My Computer and double-click on the Add Printer icon,$make_printerdef MSPRINT3.INF "HP DeskJet 560C Printer" >printers.defas shown in Figure 7-5.FOUND:DESKJETC.DRVAt this point, you can follow the Add Printer Wizard dialogs through to select the* Older Windows 95 clients may have only the first two files.manufacturer and model of the printer in question.If it asks you if you want to214 Chapter 7: Printing and Name Resolution Printing to Windows Client Printers 215you the Sharing tab of the Printer Properties frame, as shown in Figure 7-8.If youwant it available to everybody on your LAN as the Windows guest user, enter ablank password.Figure 7-6.Automatically configuring the printer driverthe client machine.If you haven t already done this, you can reset this from theFigure 7-8.The Sharing tab of the printerPrinters window, reached from the Start button, as shown in Figure 7-7.Once you ve got this working, you can add your printer to the list of standardprinters and Samba can make it available to all the other PCs in the workgroup.Tomake installation on Unix easier, the Samba distribution provides two samplescripts: smbprint and smbprint.sysv.The first works with BSD-style printers; thesecond is designed for System V printers
[ Pobierz całość w formacie PDF ]