Brian Johnson
2003-Feb-20 20:11 UTC
[Samba] cupsaddsmb - why the heck can't I get rpcclient-addprinter to work?
I can't seem to get the rpcclient-addprinter to work - grrrrrr It looks like the drivers files are copied correctly and the NT drivers are added correctly but the addprinter command says it's unsuccessful! rpcclient localhost -N -U JOHNSON\\root -c 'enumprinters' shows the printer!! What's going on? I've tried removing /var/cache/samba/ntdrivers.tdb /var/cache/samba/ntprinters.tdb and reissuing cupsaddsmb -v -U root -a but I still get the addprinter error! I also get a list of printers when I do a rpcclient-enumprinters after I delete the two tdb files If I then redo cupsaddsmb and click on the printer share from a windows client it installs a driver ... but with the defprtr2.ppd (not the HP750C.ppd) I tried copying the files from /etc/samba/drivers/WIN40/0 to /etc/samba/drivers/WIN40 and tried installing the printer on a windows client ... still getting the defprtr2.ppd (not the correct HP750C.ppd) To try to be thorough, I checked the different levels of enumprinters and enumdrivers: most worked OK but I got errors with enumprinters 3 and enumdrivers 0 and 2 #rpcclient -U root -c "enumprinters 3" piii_651 Password: cmd = enumprinters 3 result was NT_STATUS_UNSUCCESSFUL # rpcclient -U root -c "enumdrivers 0" piii_651 Password: cmd = enumdrivers 0 result was NT_STATUS_UNSUCCESSFUL # rpcclient -U root -c "enumdrivers 2" piii_651 Password: cmd = enumdrivers 2 result was NT_STATUS_UNSUCCESSFUL Sample of cupsaddsmb output below: Running command: smbclient //localhost/print\$ -N -U'root%' -c 'mkdir W32X86;put /var/spool/cups/tmp/3e552b505dfc6 W32X86/HP750C.PPD;put /usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP' added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0 Domain=[JOHNSON] OS=[Unix] Server=[Samba 2.2.7] NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86 putting file /var/spool/cups/tmp/3e552b505dfc6 as \W32X86/HP750C.PPD (8006.7 kb/s) (average 8006.8 kb/s) putting file /usr/share/cups/drivers/ADOBEPS5.DLL as \W32X86/ADOBEPS5.DLL (10355.7 kb/s) (average 10089.8 kb/s) putting file /usr/share/cups/drivers/ADOBEPSU.DLL as \W32X86/ADOBEPSU.DLL (9937.4 kb/s) (average 10054.5 kb/s) putting file /usr/share/cups/drivers/ADOBEPSU.HLP as \W32X86/ADOBEPSU.HLP (4385.1 kb/s) (average 9743.8 kb/s) Running command: smbclient //localhost/print\$ -N -U'root%' -c 'mkdir WIN40;put /var/spool/cups/tmp/3e552b505dfc6 WIN40/HP750C.PPD;put /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put /usr/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put /usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;' added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0 Domain=[JOHNSON] OS=[Unix] Server=[Samba 2.2.7] NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40 putting file /var/spool/cups/tmp/3e552b505dfc6 as \WIN40/HP750C.PPD (8006.7 kb/s) (average 8006.8 kb/s) putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (11440.0 kb/s) (average 11051.4 kb/s) putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (11508.1 kb/s) (average 11309.7 kb/s) putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (10458.9 kb/s) (average 11205.7 kb/s) putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD (4392.1 kb/s) (average 11061.7 kb/s) putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (8432.2 kb/s) (average 10905.0 kb/s) putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (6999.8 kb/s) (average 10804.2 kb/s) Running command: rpcclient localhost -N -U'root%' -c 'adddriver "Windows NT x86" "HP750C:ADOBEPS5.DLL:HP750C.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"' cmd = adddriver "Windows NT x86" "HP750C:ADOBEPS5.DLL:HP750C.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL" Printer Driver HP750C successfully installed. Running command: rpcclient localhost -N -U'root%' -c 'addprinter HP750C HP750C "HP750C" ""' cmd = addprinter HP750C HP750C "HP750C" "" result was NT_STATUS_UNSUCCESSFUL Running command: rpcclient localhost -N -U'root%' -c 'adddriver "Windows 4.0" "HP750C:ADOBEPS4.DRV:HP750C.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"' cmd = adddriver "Windows 4.0" "HP750C:ADOBEPS4.DRV:HP750C.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL" Printer Driver HP750C successfully installed.
Kurt Pfeifle
2003-Feb-20 23:08 UTC
[Samba] cupsaddsmb - why the heck can't I get rpcclient-addprinter to work?
> Date: Thu, 20 Feb 2003 20:11:21 +0000 > From: "Brian Johnson" <bjohnson@jecinc.on.ca> > To: samba@lists.samba.org > Subject: [Samba] cupsaddsmb - why the heck can't I get rpcclient-addprinter to work? > Message-ID: <20030220.57L.51223600@192.168.0.1> > Content-Type: text/plain;charset="iso-8859-1" > MIME-Version: 1.0 > Content-Transfer-Encoding: 8bit > Precedence: list > Message: 39 > > I can't seem to get the rpcclient-addprinter to work - grrrrrrWhich versions of software are you using? Samba, CUPS? Which OS?> It looks like the drivers files are copied correctly and the NT drivers are added > correctly but the addprinter command says it's unsuccessful!"cupsaddsmb - why the heck can't I get rpcclient-addprinter to work?" Maybe because your CUPS/cupsaddsmb version is too old ? The "addprinter" rpcclient command formerly used by cupsaddsmb has long been replaced by the "setdriver" command... Cheers, Kurt
Brian Johnson
2003-Feb-21 04:16 UTC
[Samba] cupsaddsmb - why the heck can't I get rpcclient-addprinter to work?
cups-1.1.14-15.2 samba-2.2.7-1.7.3 Educate me please ... man rpcclient shows: setdriver <printername> <drivername> - Execute a SetPrinter() command to update the printer driver associated with an installed printer. The printer driver must already be correctly installed on the print server. See also the enumprinters and enumdrivers commands for obtaining a list of of installed printers and drivers. This sounds like the printer must already be installed - how is that done if not via addprinter? Currently, if I use enumprinters and enumdrivers (without a level setting), I get a listing of installed drivers and installed printers. If I run setdriver for each of the printer/driver pairs, will it work? I just did it but don't have a windows client to test it against until tomorrow (I'm connected remotely via a ssh terminal) Kurt Pfeifle (kpfeifle@danka.de) wrote*:> >> Date: Thu, 20 Feb 2003 20:11:21 +0000 >> From: "Brian Johnson" <bjohnson@jecinc.on.ca> >> To: samba@lists.samba.org >> Subject: [Samba] cupsaddsmb - why the heck can't I get rpcclient-addprinter to work? >> Message-ID: <20030220.57L.51223600@192.168.0.1> >> Content-Type: text/plain;charset="iso-8859-1" >> MIME-Version: 1.0 >> Content-Transfer-Encoding: 8bit >> Precedence: list >> Message: 39 >> >> I can't seem to get the rpcclient-addprinter to work - grrrrrr > >Which versions of software are you using? Samba, CUPS? Which OS? > >> It looks like the drivers files are copied correctly and the NT drivers are added >> correctly but the addprinter command says it's unsuccessful! > >"cupsaddsmb - why the heck can't I get rpcclient-addprinter to work?" > >Maybe because your CUPS/cupsaddsmb version is too old ? > >The "addprinter" rpcclient command formerly used by cupsaddsmb has >long been replaced by the "setdriver" command... > > >Cheers, >Kurt > >
Kurt Pfeifle
2003-Feb-21 13:42 UTC
[Samba] cupsaddsmb - why the heck can't I get rpcclient-addprinter to work?
> [Samba] cupsaddsmb - why the heck can't I get rpcclient-addprinter to work? > Brian Johnson bjohnson at jecinc.on.ca > Fri Feb 21 04:16:15 GMT 2003 > > cups-1.1.14-15.2Please upgrade to CUPS-1.1.18+ to make cupsaddsmb work with Samba-2.2.7a+ Please stick to the settings suggested in "man cupsaddsmb", if your own ideas don't work.> samba-2.2.7-1.7.3 > > Educate me please ...I can't... ;-)> man rpcclient shows: > setdriver <printername> <drivername> - Execute a SetPrinter() command > to update the printer driver associated with an installed printer. > The printer driver must already be correctly installed on the print > server. > > See also the enumprinters and enumdrivers commands for obtaining a > list of of installed printers and drivers. > > This sounds like the printer must already be installed - how is that done if not via > addprinter?The setdriver command is meant to associate a different driver to a printer. The members of the driver/printer pair to be chosen must be mapping to the lists of drivers and printers enumerated by the "enumdrivers" and "enumprinters" commands.> Currently, if I use enumprinters and enumdrivers (without a level setting), I get a > listing of installed drivers and installed printers. If I run setdriver for each of > the printer/driver pairs, will it work?If you didn't get an error message, it should work. "rpcclient ....-c "enumprinters 2" should list the new driver after the fact. To get the clients to work with a new driver (if it had one already), you will have to delete the printer first there (my experience). After that, *you* *will* *have* *to* *delete* *the* *old* *driver* *too* *!* [To do this fast, right-click on the *background* of the "printers" folder, select "server properties" and hangle yourself to the tab/menu/dialog (not sure if it is the same in Win NT) to remove the driver files in question. Only then will the registry entries be cleansed. If you don't do that, there is the danger, that Windows will re-install the *old* drivers" with your second attempt.]> I just did it but don't have a windows > client to test it against until tomorrow (I'm connected remotely via a ssh terminal)Please tell us how it works out.> Kurt Pfeifle (kpfeifle at danka.de) wrote*: >> >>> Date: Thu, 20 Feb 2003 20:11:21 +0000 >>> From: "Brian Johnson" <bjohnson at jecinc.on.ca> >>> To: samba at lists.samba.org >>> Subject: [Samba] cupsaddsmb - why the heck can't I get rpcclient-addprinter to work? >>> Message-ID: <20030220.57L.51223600 at 192.168.0.1> >>> Content-Type: text/plain;charset="iso-8859-1" >>> MIME-Version: 1.0 >>> Content-Transfer-Encoding: 8bit >>> Precedence: list >>> Message: 39 >>> >>> I can't seem to get the rpcclient-addprinter to work - grrrrrr >> >>Which versions of software are you using? Samba, CUPS? Which OS? >> >>> It looks like the drivers files are copied correctly and the NT drivers are added >>> correctly but the addprinter command says it's unsuccessful! >> >>"cupsaddsmb - why the heck can't I get rpcclient-addprinter to work?" >> >>Maybe because your CUPS/cupsaddsmb version is too old ? >> >>The "addprinter" rpcclient command formerly used by cupsaddsmb has >>long been replaced by the "setdriver" command... >> >> >>Cheers, >>Kurt >>>