> [Samba] Samba3 Printer drivers installation > Andrei Mikhailovsky andrei at arhont.com > Tue Jan 20 11:52:41 GMT 2004 > > > Hello, > > I am having problems installing printer drivers for Samsung ML-4500 > printer, so windows workstation can just fetch them from print$ share. > When I run rpcclient with -d 4 i get the following error: > > whale:/home/samba/home# rpcclient -d 4 -Uroot%xxxx -c 'adddriver > "Windows NT x86" > "SSGK2:ssgk2.cnt:ssgk2.dat:ssgk2.dll:ssgk2.hlp:ssgk2.ini:ssgk2.sdd:ssgk2su.dll:ssgk2ui.dll:ssgk2um.dll' > WHALEYour command is wrong. I can see this by just counting the "colons" in it. There must be exactly 7 colons -- yours has 9! [....]> result was WERR_INVALID_PARAM > > Does anyone know what the problem isYes.> and how to fix it? >Use the correct syntax :-) It is described here http://samba.vernstok.nl/htmldocs/CUPS-printing.html#id2562523 in very great detail, as well as at many other places, like "man rpcclient" (search for "adddriver"). Admittedly, it is not very simple, so I'll try to explain again. The man page quotes this: adddriver <arch> <config> [<version>] <arch> is the Win architecture family. It may be either "Windows NT x86" (which stands for Windows NT 4.0, Windows 2000/2003 and Windows XP) or "Windows 4.0" (which represents Windows 95/98/ME). You need to use the quotes because of the spaces in the string. <config> is the long string, containing 8 separate fields, separated by 7 colons. The last field may contain either "NULL", or a list of additional driver files *separated by commas*. All this 8 fields must be filled in, none may be empty (in which case the "NULL" needs to go in), and they need to be filled in in the correct order. The correct order is this: LongDriverName:DriverFileName:DataFileName:ConfigFileName:HelpFileName:LanguageMonitorName:DefaultDataType:Comma-Separated-list-of-Files The LanguageMonitorName field should contain "NULL". The DefaultDataType for Samba and NT72K/XP clients is "RAW". To find out which files are which type, use one of these commands to query an existing NT/2000/XP workstation with the same driver installed locally (and sharing the printer): rpcclient -U'Administrator' -c 'enumdrivers 3' name-of-remote-win-workstation rpcclient -U'Administrator' -c 'getdriver printername 3' name-of-remote-win-workstation The output should show you the correct mapping of driver files to the types described above (using similar nomenclatura, albeit not exactly the same, but enough to guess). Note that the list of the "Dependent Files" is what needs to go, comma-separated, into the last of the 8 mentioned fields in the adddriver subcommand to rpcclient. Lastly (AND VERY IMPORTANT!!): all the files you name in the adddriver command need to be present in [print$]/W32X86/ *before* you run the command. Note, that the successful command will create a sub-directory named "2" (or "3", if you use a "version 3", non-kernel-mode driver for 2000/XP) and move the files there. A partially successful adddriver command could have moved away a part of the files, and therefor you need to put the files again into the original location, before you can try again: Finally, here are 4 examples for a working "rpcclient adddriver" command: ---- 1 --------------------------------------------------------------------------- rpcclient -U'Administrator%xxxxxxxx' -c 'adddriver "Windows NT x86" \ "HP LaserJet 8100:\ cupsdrvr.dll:\ mopi.ppd:\ cupsui.dll:\ cups.hlp:\ NULL:\ RAW:\ NULL"'\ TURBO_XP # This command installs the NT/2000/XP CUPS driver into a Windows XP # Professional workstation named "TURBO_XP", when it is run from any # Samba machine, and if the files had been placed into (UNC-Notation follows) # "\\turbo_xp\print$\W32X86\" previously (by, for example an appropriate # smbclient command....) or (path specific to my own system follows) # into "C:\WINDOWS\SYSTEM32\SPOOL\drivers\W32X86\" ---------------------------------------------------------------------------------- ----- 2 -------------------------------------------------------------------------- rpcclient -U'Administrator%xxxxxxxx' -c 'adddriver "Windows 4.0" \ "HP LaserJet 8100:\ ADOBEPS4.DRV:\ mopi.PPD:\ NULL:\ ADOBEPS4.HLP:\ PSMON.DLL:\RAW:\ ADOBEPS4.DRV,mopi.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'\ TURBO_XP # This command installs the Win95/98/ME Adobe PostScript driver into the # Windows XP Professional workstation named "TURBO_XP", when it is run from # any Samba machine, and if the files had been placed into (UNC-Notation follows) # "\\turbo_xp\print$\WIN40\" previously (by, for example an appropriate # smbclient command....) or (path specific to my own system follows) # into "C:\WINDOWS\SYSTEM32\SPOOL\drivers\WIN40\" ---------------------------------------------------------------------------------- ----- 3 -------------------------------------------------------------------------- rpcclient -U'root%xxxx' -c 'adddriver "Windows NT x86" \ "HP LaserJet 8100:\ cupsdrvr.dll:\ mopi.ppd:\ cupsui.dll:\ cups.hlp:\ NULL:\ RAW:\ NULL"'\ localhost # This command installs the NT/2000/XP CUPS driver the Samba host's # "print$" share, when it is run on that Samba machine, and # if the files had been placed into (UNC-Notation follows) # "\\localhost\print$\W32X86\" previously (by, for example an appropriate # smbclient command....), or (path specific to my own system follows) # into "/etc/samba/drivers/W32X86/" ---------------------------------------------------------------------------------- ----- 4 -------------------------------------------------------------------------- rpcclient -U'root%xxxx' -c 'adddriver "Windows 4.0" \ "HP LaserJet 8100:\ ADOBEPS4.DRV:\ mopi.PPD:\ NULL:\ ADOBEPS4.HLP:\ PSMON.DLL:\RAW:\ ADOBEPS4.DRV,mopi.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'\ localhost # This command installs the Win95/98/ME Adobe PostScript driver into a # Windows XP Professional workstation, when it is run from any Samba # machine, and if the files had been placed into (UNC-Notation follows) # "\\localhost\print$\WIN40\" previously (by, for example an appropriate # smbclient command....), or (path specific to my own system follows) # into "/etc/samba/drivers/WIN40/" ---------------------------------------------------------------------------------- I hope this helps. Cheers, Kurt
Andrei Mikhailovsky
2004-Jan-31 01:19 UTC
[Samba] Samba] Samba3 Printer drivers installation
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kurt Pfeifle wrote: | Andrei Mikhailovsky wrote: | |> Thanks a lot for the help. |> | | Please always reply to list. Often I don't get private mails while I | am on travel. But sometimes I can scan the list (via its web interface) | while "on the road". | |> When I was initially installing the drivers, I was following a how-to |> that didn't specify that you need exact order for the driver files. |> | | It does. It does so in very much detail. I spent my complete annual | holiday last summer to find everything out and write it down as a | documentation. So don't tell me it doesn't specify the exact order, | because I know it went into my draft at more than 1 place. | Sorry for not making it clear earlier on, I have followed a 3rd party how-to that i've found by google-ing. After i have followed your how-to (for which I am very thankful) I've managed to install printer drivers. I've followed the following procedure: 1. to get windows drivers files i've used: rpcclient -U'user%pass' -c \ 'getdriver "Samsung 4500" 3' TURBO_XP 2. Then i've downloaded drivers from windows machine: smbclient //TURBO_XP/print\$ -U'user%pass' \ ~ -c 'cd W32X86/2; mget *' 3. Upload files to samba print$: smbclient //SAMBA-CUPS/print\$ -U'user%pass' -c \ ~ 'cd W32X86; mput *' 4. Added printer driver: rpcclient -Uuser%pass -c 'adddriver "Windows NT x86" \ ~ "Samsung: file1:file2,etc.."' where the file order is as following: Driver File Name:Data File Name:Config File Name:Help File Name:Language Monitor Name:Default Data Type: The driver files where added successfully: Printer Driver Samsung successfully installed 5. Checking samba server for driver succeded: rpcclient -U'user%pass' -c 'enumdrivers' SAMBA-server [Windows NT x86] Printer Driver Info 1: ~ Driver Name: [Samsung] 6.Setting driver to printer: rpcclient -U'user%pass' -c 'setdriver Samsung Samsung' SAMBA-server As far as i can see from the how-to the server side setup is finished. Now, from the client side, i should double click on the printer and windows should fetch the driver and install it. When I do this, windows 2000/XP responds that unable to find driver, do you want to make a local search for driver. However, if i check the properties for the printer, i can see that the driver is there and that it is available for the right architecture. But if I use the windows Add printer wizard to install the same driver to samba print$ share, the printer driver gets installed perfectly; i.e. rpcclient -U'user%pass' -c 'enumdrivers' SAMBA-server [Windows NT x86] Printer Driver Info 1: ~ Driver Name: [Samsung] as well as the drivers are placed in exactly the same location as they where using samba setup procedure that i've mentioned above. I don't actually know what might be the difference between the driver installation between windows Add printer wizard and samba rpcclient. Do you have any idea what I am doing wrong? As I prefer not to use windows at all possible costs, i would really like to sort out the printer installation by using command line on linux rather then fluff-clicking on windows. Thanks for all the help! - -- Andrei Mikhailovsky Arhont Ltd Web: http://www.arhont.com Tel: +44 (0)870 4431337 Fax: +44 (0)1454 201200 PGP: Key ID - 0xFF67A4F4 PGP: Server - keyserver.pgp.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD8DBQFAGwJN5bSBOf9npPQRAvh8AJ4joCafdHQkRN6bHqKGeVr+HHNd6gCbB9J7 k90ycWdpLfh59fF+KgrZtGM=+Ii3 -----END PGP SIGNATURE-----
Apparently Analagous Threads
- rpcclient error -- CUPS 1.1.16 provides PostScript driver for WindowsNT/2K/XP
- using cupsaddsmb with W98
- Re: How do I force Samba to update shared printer list? (2.2.6-pre2)
- rpcclient returns NT_STATUS_NO_SUCH_DEVICE on adddriver
- problem adding printer driver