[Samba] Problem with rpcclient command

Kurt Pfeifle kpfeifle at danka.de
Mon Jul 28 23:57:56 GMT 2003


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 functionality

How 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 Manager

BTW -- 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




More information about the samba mailing list