Hi, I am trying to query a W2K PDC for info on a print driver by issuing the following command: rpcclient -Uxxx%yyy -d 3 -c 'getdriver "HP LaserJet 8000 Series PS"' abert The response I get is: Initialising global parameters params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf" Processing section "[global]" added interface ip=10.219.255.249 bcast=10.219.255.255 nmask=255.255.0.0 resolve_lmhosts: Attempting lmhosts lookup for name abert<0x20> Connecting to host=abert share=IPC$ Connecting to 10.225.25.100 at port 445 lsa_io_sec_qos: length c does not match size 8 cmd = getdriver "HP LaserJet 8000 Series PS" Error opening printer handle for HP LaserJet 8000 Series PS! result was NT_STATUS_UNSUCCESSFUL I have administrator rights on the PDC and "HP LaserJet 8000 Series PS" is the printer type as gleaned from the add printer wizard. Unfortunately our Windows folks are completely unfamiliar with the MS-RPC functionality that as far as I know is built-in to the W2K server. Any idea what might be the problem either on the W2K box or in Samba? Thanks, Rob Rob Tanner UNIX Services Manager Linfield College, McMinnville OR
Hi Rob Tanner, you wrote:> The response I get is: > Initialising global parameters > params.c:pm_process() - Processing configuration file > "/etc/samba/smb.conf" Processing section "[global]" > added interface ip=10.219.255.249 bcast=10.219.255.255 > nmask=255.255.0.0 resolve_lmhosts: Attempting lmhosts lookup for name > abert<0x20> > Connecting to host=abert share=IPC$ > Connecting to 10.225.25.100 at port 445 > lsa_io_sec_qos: length c does not match size 8 > cmd = getdriver "HP LaserJet 8000 Series PS" > Error opening printer handle for HP LaserJet 8000 Series PS! > result was NT_STATUS_UNSUCCESSFULSorry, I cannot help you. I'm only a man with rpcclient problems too: vmeis 1.0 # cupsaddsmb -U root -a -v Password for root required to access localhost via SAMBA: Running command: smbclient //localhost/print\$ -N -U'root%xxx' -c 'mkdir W32X86;put /var/spool/cups/tmp/3f1aaa72b068a W32X86/drucker1.ppd;put /usr/share/cups/drivers/cupsdrvr.dll W32X86/cupsdrvr.dll;put /usr/share/cups/drivers/cupsui.dll W32X86/cupsui.dll;put /usr/share/cups/drivers/cups.hlp W32X86/cups.hlp' added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0 added interface ip=192.168.0.4 bcast=192.168.0.255 nmask=255.255.255.0 Domain=[TOMMAIK] OS=[Unix] Server=[Samba 2.2.8a] NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86 putting file /var/spool/cups/tmp/3f1aaa72b068a as \W32X86/drucker1.ppd (1869.7 kb/s) (average 1869.7 kb/s) putting file /usr/share/cups/drivers/cupsdrvr.dll as \W32X86/cupsdrvr.dll (10874.2 kb/s) (average 9373.5 kb/s) putting file /usr/share/cups/drivers/cupsui.dll as \W32X86/cupsui.dll (9164.7 kb/s) (average 9282.9 kb/s) putting file /usr/share/cups/drivers/cups.hlp as \W32X86/cups.hlp (4633.3 kb/s) (average 9033.8 kb/s) ###################################### OK ###################################### Running command: rpcclient localhost -N -U'root%xxx' -c 'adddriver "Windows NT x86" "drucker1:cupsdrvr.dll:drucker1.ppd:cupsui.dll:cups.hlp:NULL:RAW:NULL"' cmd = adddriver "Windows NT x86" "drucker1:cupsdrvr.dll:drucker1.ppd:cupsui.dll:cups.hlp:NULL:RAW:NULL" Printer Driver drucker1 successfully installed. ###################################### OK ####################################### Running command: rpcclient localhost -N -U'root%xxx' -c 'setdriver drucker1 drucker1' cmd = setdriver drucker1 drucker1 SetPrinter call failed! result was NT_STATUS_UNSUCCESSFUL ####################################### NOT OK ####################################### vmeis 1.0 # rpcclient -Uroot%xxx -c 'enumprinters' localhost | grep -C2 drucker1 cmd = enumprinters flags:[0x800000] name:[\\localhost\drucker1] description:[\\localhost\drucker1,,Parallel_in_Tommis_Absteige] comment:[Parallel_in_Tommis_Absteige] vmeis 1.0 # rpcclient -Uroot%xxx -c 'getprinter drucker1 2' localhost | grep driver drivername:[] vmeis 1.0 # rpcclient -Uroot%xxx -c 'getprinter drucker1 2' localhost | grep -C4 driv servername:[\\localhost] printername:[\\localhost\drucker1] sharename:[drucker1] portname:[Samba Printer Port] drivername:[] comment:[Parallel_in_Tommis_Absteige] location:[] sepfile:[] printprocessor:[winprint] vmeis 1.0 # rpcclient -Uroot%xxx -c 'getdriver drucker1' localhost cmd = getdriver drucker1 vmeis 1.0 # rpcclient -Uroot%xxx -c 'enumdrivers 3' localhost | grep -B2 -A5 drucker1 ##################################################################### No output ##################################################################### No output? Samba doesn't recognizing printer drivers, but they are here: vmeis 1.0 # ls -l /samba_printer_drivers/W32X86/ total 4 drwxr--r-- 2 root root 4096 Jul 20 17:24 2 vmeis 1.0 # ls -l /samba_printer_drivers/W32X86/2 total 520 -rwxr--r-- 1 root root 14234 Jul 20 18:09 cups.hlp -rwxr--r-- 1 root root 278380 Jul 20 18:09 cupsdrvr.dll -rwxr--r-- 1 root root 215848 Jul 20 18:09 cupsui.dll -rwxr--r-- 1 root root 9573 Jul 20 18:09 drucker1.ppd vmeis 1.0 # rpcclient -Uroot%xxx -c 'enumdrivers 3' localhost cmd = enumdrivers 3 [Windows NT x86] Segmentation fault ############################################## vmeis 1.0 # rpcclient -d 3 -Uroot%xxx -c 'enumdrivers 3' localhost Initialising global parameters params.c:pm_process() - Processing configuration file "/etc/smb.conf" Processing section "[global]" added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0 added interface ip=192.168.0.4 bcast=192.168.0.255 nmask=255.255.255.0 resolve_lmhosts: Attempting lmhosts lookup for name localhost<0x20> resolve_hosts: Attempting host lookup for name localhost<0x20> Connecting to host=localhost share=IPC$ Connecting to 127.0.0.1 at port 445 error connecting to 127.0.0.1:445 (Connection refused) Connecting to 127.0.0.1 at port 139 lsa_io_sec_qos: length c does not match size 8 cmd = enumdrivers 3 [Windows NT x86] Segmentation fault ################################################ Above is a similar message as in you mail: lsa_io_sec_qos: length c does not match size 8 Maybe this is the problem? My configuration: Samba is _not_ linked to cups Samba version is 2.2.8a cupsaddsmb and rpcclient are successfull, if samba is linked to cups. But I want to print to cups over samba per lpr commands (because some users of eisfair want to use lprng and other want to use cups) and there is only one samba package for that and the point and print functions should be used. der tom
Thomas Bork tombork at web.de wrote on Samba-Digest:> Mon Jul 28 22:00:56 GMT 2003 > > Hi Rob Tanner, > > you wrote: > >> The response I get is: >> Initialising global parameters >> params.c:pm_process() - Processing configuration file >> "/etc/samba/smb.conf" Processing section "[global]" >> added interface ip=10.219.255.249 bcast=10.219.255.255 >> nmask=255.255.0.0 resolve_lmhosts: Attempting lmhosts lookup for name >> abert<0x20> >> Connecting to host=abert share=IPC$ >> Connecting to 10.225.25.100 at port 445 >> lsa_io_sec_qos: length c does not match size 8 >> cmd = getdriver "HP LaserJet 8000 Series PS" >> Error opening printer handle for HP LaserJet 8000 Series PS! >> result was NT_STATUS_UNSUCCESSFUL > > Sorry, I cannot help you. I'm only a man with rpcclient problems too: > > vmeis 1.0 # cupsaddsmb -U root -a -v > Password for root required to access localhost via SAMBA: > Running command: smbclient //localhost/print\$ -N -U'root%xxx' -c 'mkdir > W32X86;put /var/spool/cups/tmp/3f1aaa72b068a W32X86/drucker1.ppd;put > /usr/share/cups/drivers/cupsdrvr.dll W32X86/cupsdrvr.dll;put > /usr/share/cups/drivers/cupsui.dll W32X86/cupsui.dll;put > /usr/share/cups/drivers/cups.hlp W32X86/cups.hlp' > added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0 > added interface ip=192.168.0.4 bcast=192.168.0.255 nmask=255.255.255.0 > Domain=[TOMMAIK] OS=[Unix] Server=[Samba 2.2.8a] > NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86 > putting file /var/spool/cups/tmp/3f1aaa72b068a as \W32X86/drucker1.ppd > (1869.7 kb/s) (average 1869.7 kb/s) > putting file /usr/share/cups/drivers/cupsdrvr.dll as > \W32X86/cupsdrvr.dll (10874.2 kb/s) (average 9373.5 kb/s) > putting file /usr/share/cups/drivers/cupsui.dll as \W32X86/cupsui.dll > (9164.7 kb/s) (average 9282.9 kb/s) > putting file /usr/share/cups/drivers/cups.hlp as \W32X86/cups.hlp > (4633.3 kb/s) (average 9033.8 kb/s) > ###################################### > OK > ###################################### > > Running command: rpcclient localhost -N -U'root%xxx' -c 'adddriver > "Windows NT x86" > "drucker1:cupsdrvr.dll:drucker1.ppd:cupsui.dll:cups.hlp:NULL:RAW:NULL"' > cmd = adddriver "Windows NT x86" > "drucker1:cupsdrvr.dll:drucker1.ppd:cupsui.dll:cups.hlp:NULL:RAW:NULL" > Printer Driver drucker1 successfully installed. > ###################################### > OK > ####################################### > > Running command: rpcclient localhost -N -U'root%xxx' -c 'setdriver > drucker1 drucker1' > cmd = setdriver drucker1 drucker1 > SetPrinter call failed! > result was NT_STATUS_UNSUCCESSFUL > ####################################### > NOT OK > ####################################### > > > vmeis 1.0 # rpcclient -Uroot%xxx -c 'enumprinters' localhost | grep -C2 > drucker1 > cmd = enumprinters > flags:[0x800000] > name:[\\localhost\drucker1] > description:[\\localhost\drucker1,,Parallel_in_Tommis_Absteige] > comment:[Parallel_in_Tommis_Absteige] > vmeis 1.0 # rpcclient -Uroot%xxx -c 'getprinter drucker1 2' localhost | > grep driver > drivername:[] > vmeis 1.0 # rpcclient -Uroot%xxx -c 'getprinter drucker1 2' localhost | > grep -C4 driv > servername:[\\localhost] > printername:[\\localhost\drucker1] > sharename:[drucker1] > portname:[Samba Printer Port] > drivername:[] > comment:[Parallel_in_Tommis_Absteige] > location:[] > sepfile:[] > printprocessor:[winprint] > > vmeis 1.0 # rpcclient -Uroot%xxx -c 'getdriver drucker1' localhost > cmd = getdriver drucker1 > vmeis 1.0 # rpcclient -Uroot%xxx -c 'enumdrivers 3' localhost | > grep -B2 -A5 drucker1 > ##################################################################### > No output > ##################################################################### > > No output? Samba doesn't recognizing printer drivers,This is most likely a wrong interpretation of what you are seeing. The "enumdrivers 3" subcommand segfaults in many versions of Samba-2.2.x. Try a simple "enumdrivers" command and you should see the "driver1" listed, since your above quoted "adddriver" command *did* install it.> but they are here: >Of course they are. Your "adddriver" command succeeded, and told you so. What failed was the "setdriver" command. The "setdriver" command associates a driver to the printer(name).> vmeis 1.0 # ls -l /samba_printer_drivers/W32X86/ > total 4 > drwxr--r-- 2 root root 4096 Jul 20 17:24 2 > vmeis 1.0 # ls -l /samba_printer_drivers/W32X86/2 > total 520 > -rwxr--r-- 1 root root 14234 Jul 20 18:09 cups.hlp > -rwxr--r-- 1 root root 278380 Jul 20 18:09 cupsdrvr.dll > -rwxr--r-- 1 root root 215848 Jul 20 18:09 cupsui.dll > -rwxr--r-- 1 root root 9573 Jul 20 18:09 drucker1.ppd > > vmeis 1.0 # rpcclient -Uroot%xxx -c 'enumdrivers 3' localhost > cmd = enumdrivers 3 > > [Windows NT x86] > Segmentation fault > ############################################## >What does "rpcclient -Uroot%xxx -c 'enumdrivers' localhost" give? And what "rpcclient -Uroot%xxx -c 'enumdrivers 2' localhost"?> vmeis 1.0 # rpcclient -d 3 -Uroot%xxx -c 'enumdrivers 3' localhost > Initialising global parameters > params.c:pm_process() - Processing configuration file "/etc/smb.conf" > Processing section "[global]" > added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0 > added interface ip=192.168.0.4 bcast=192.168.0.255 nmask=255.255.255.0 > resolve_lmhosts: Attempting lmhosts lookup for name localhost<0x20> > resolve_hosts: Attempting host lookup for name localhost<0x20> > Connecting to host=localhost share=IPC$ > Connecting to 127.0.0.1 at port 445 > error connecting to 127.0.0.1:445 (Connection refused) > Connecting to 127.0.0.1 at port 139 > lsa_io_sec_qos: length c does not match size 8 > cmd = enumdrivers 3 > > [Windows NT x86] > Segmentation fault > ################################################ > > Above is a similar message as in you mail: > lsa_io_sec_qos: length c does not match size 8 >This doesn't hurt. I have it for all my completely successfull "cupsaddsmb" or "rpcclient enumdrivers" commands....> Maybe this is the problem? >No.> My configuration: > Samba is _not_ linked to cupsI *believe* this should *not* be causing the particular errors you are seeing. I currently have no advice for you other than trying to get level 3, 5 and 10 Samba logs with maybe more insight-providing messages.> Samba version is 2.2.8a > > cupsaddsmb and rpcclient are successfull, if samba is linked to cups. > But I want to print to cups over samba per lpr commands (because some > users of eisfair want to use lprng and other want to use cups)Strange reasoning. So you want to please CUPS users by offering CUPS *at least* partial support. In order to please the LPRng users, you offer *only* partial CUPS support.... Why don't you *link* Samba against libcups (as you say: then your rpcclient commands work...) and configure Samba using [global] .... printing = sysv printcap = lpstat .... [printername] print command = whatever-you-are-pleased-with.sh #there is a similar example in the new HOWTO Collection (as then you can use any print command you like)?? [But be aware, that you should have the the "LPRng" version of the "lpr"-command and the CUPS version of it under 2 different names on your system, since the CUPS version is using IPP to print, and that your Samba print command uses the right one...]> and there > is only one samba package for that and the point and print functions > should be used. > > > der tom >Cheers, Kurt
Rob Tanner rtanner+samba at linfield.edu wrote on Samba-digest:> Mon Jul 28 10:20:06 GMT 2003 > > > Hi, > > I am trying to query a W2K PDC for info on a print driver by issuing the > following command: > > rpcclient -Uxxx%yyy -d 3 -c 'getdriver "HP LaserJet 8000 Series PS"' abert >The "getdriver" command expects a *printer*name as an argument. If successfull, it will name you the driver associated with that printer. Are you sure that the "HP LaserJet 8000 Series PS" is the correct name for that printer you are querying? To me, this looks rather like a driver name... (Yes, I know, that Windows often suggests the driver name to become the printer name too...) What do you get with rpcclient -Uxxx%yyy -d 3 -c 'enumdrivers' and rpcclient -Uxxx%yyy -d 3 -c 'enumprinters' ??> The response I get is: > Initialising global parameters > params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf" > Processing section "[global]" > added interface ip=10.219.255.249 bcast=10.219.255.255 nmask=255.255.0.0 > resolve_lmhosts: Attempting lmhosts lookup for name abert<0x20> > Connecting to host=abert share=IPC$ > Connecting to 10.225.25.100 at port 445 > lsa_io_sec_qos: length c does not match size 8 > cmd = getdriver "HP LaserJet 8000 Series PS" > Error opening printer handle for HP LaserJet 8000 Series PS! > result was NT_STATUS_UNSUCCESSFUL > > I have administrator rights on the PDC and "HP LaserJet 8000 Series PS" is > the printer type"printer type" or "printer name"?> as gleaned from the add printer wizard. Unfortunately > our Windows folks are completely unfamiliar with the MS-RPC functionalityHow could that be different? After all, MS didn't document MS-RPC publicly... So don't be harsh on them... ;-)> that as far as I know is built-in to the W2K server. > > Any idea what might be the problem either on the W2K box or in Samba? > > Thanks, > Rob > > Rob Tanner > UNIX Services ManagerBTW -- which version of Samba/rpcclient are you using? More recent versions would tell "WERR_UNKNOWN_PRINTER_DRIVER" or "WERR_INVALID_PRINTER_NAME" instead of "NT_STATUS_UNSUCCESSFUL", depending on the error. Can you try rpcclient -Uxxx%yyy -d 3 -c 'getdriver "a_wrong_printer_name"' abert to see which error message you get then?> Linfield College, McMinnville OR >Cheers, Kurt