SetPrinter call failed, APW, rpcclient setdriver fails, help please

Jason Jeremias jasonj at uui-alaska.com
Mon Dec 16 20:28:01 GMT 2002


The change Arcady suggested did not solve the problem.  I have level 10 
logs of what's going on but I can't make heads or tails out of it.  I 
seem some errors about INSUFFICIENT_BUFFER, Returning NULL Devicemode!.  
I am going to post as small portion of the log, as it seems to be the 
problem.  I was running the command """ setdriver A_MIS_4000 "HP 
LaserJet 4000 Series PCL 6" """ in rpcclient as root

2002/12/16 11:06:56, 10] printing/nt_printing.c:get_a_printer(3306)
  get_a_printer: [A_MIS_4000] level 2 returning WERR_OK
  Converting info_2 struct
[2002/12/16 11:06:56, 7] 
rpc_parse/parse_spoolss.c:uni_2_asc_printer_info_2(5346)
  Converting from UNICODE to ASCII
  start converting
[2002/12/16 11:06:56, 5] rpc_server/srv_spoolss_nt.c:check_printer_ok(4869)
  check_printer_ok: servername=\\cartman 
printername=\\cartman\A_MIS_4000 sharename=A_MIS_4000 portname=Samba 
Printer Port drivername=HP LaserJet 4000 Series PCL 6 comment=Anchorage 
- MIS HP4000 Printer location=
[2002/12/16 11:06:56, 3] rpc_server/srv_spoolss_nt.c:update_printer(5291)
  update_printer: printer property change denied by handle
[2002/12/16 11:06:56, 5] rpc_parse/parse_prs.c:prs_debug(60)
  000000 spoolss_io_r_setprinter
[2002/12/16 11:06:56, 5] rpc_parse/parse_prs.c:prs_werror(648)
      0000 status: WERR_ACCESS_DENIED
[2002/12/16 11:06:56, 5] rpc_server/srv_pipe.c:api_rpcTNP(1218)
  api_rpcTNP: called api_spoolss_rpc successfully
[2002/12/16 11:06:56, 3] rpc_server/srv_pipe_hnd.c:free_pipe_context(444)
  free_pipe_context: destroying talloc pool of size 1402
[2002/12/16 11:06:56, 10] rpc_server/srv_pipe_hnd.c:write_to_pipe(766)
  write_to_pipe: data_used = 520
[2002/12/16 11:06:56, 6] rpc_server/srv_pipe_hnd.c:read_from_pipe(799)
  read_from_pipe: 70d4 name: spoolss len: 536

This ACCESS_DENIED in spoolss_io_r_setprinter seems to be the problem. 
Trouble is I don't know why I would get an Access denied? I'm not sure 
if I should post the whole logs to the list?  Could someone help?


Thanks you

Jason


Arcady Chernyak wrote:

>Hi Jason.
>May be I had the same problem and I solved it.
>I migrate from Samba 2.2.2 to Samba 2.2.7
>When I try to install drivers I got the same response.
>(NT_STATUS_UNSUCCESSFUL).
>
>After that I analyzed log files from SAMBA and detect that call fall
>with debug message: "_spoolss_addprinterex: Attempted to add a printer
>named [%s] when one already existed!" (File rpc_server/srv_spoolss_nt.c
>line 6514).
>
>This check is a new feature (who needs it) which affect to me.
>I have simply commented it like:
>    /* check to see if the printer already exists */
>/*
>    if ((snum = print_queue_snum(printer->info_2->sharename)) != -1) {
>        DEBUG(5, ("_spoolss_addprinterex: Attempted to add a printer
>named [%s] when one already existed!\n", 
>            printer->info_2->sharename));
>        free_a_printer(&printer, 2);
>        return WERR_PRINTER_ALREADY_EXISTS;
>    }*/
>
>After this change all is working well.
>Try it I hope it can help you.
>If it does not help, take a SAMBA log file level > 6 in installation
>time and try to catch what is the reason of your fault.
>
>If anybody knows how to solve it more intelligent, he is welcome.
>
>Regards
>	Arcady
>
>
>
>-----Original Message-----
>From: Jason Jeremias [mailto:jasonj at uui-alaska.com] 
>Sent: Friday, December 13, 2002 4:09 PM
>To: samba-technical at lists.samba.org
>Subject: SetPrinter call failed, APW, rpcclient setdriver fails, help
>please
>
>I'm trying to add print drivers to printers on a Samba server using a 
>NT4 workstation.  I'm currently running Samba 2.2.7a & CUPS 1.1.17, when
>I attempt to add drivers to the new printer it crashes the NT4
>workstation.  Prior to the workstation crashing however it does copy the
>driver files to the server, it then pauses as if the workstation is
>waiting for some information from the server.  In troubleshooting the
>problem I've found this much out.
>
>With the following settings in my smb.conf file:
>printcap name = cups
>load printers = yes
>printing = cups
>
>enumdrivers works as expected it even lists the driver I attempted to 
>add from the NT4 workstations.
>
>enumprinters works also I can see all the printers I'm supposed to.
>
>setdriver however  fails as seen here:
>rpcclient $> setdriver A_CC_HP4300 "HP LaserJet 4300 PCL6"
>SetPrinter call failed!
>result was NT_STATUS_UNSUCCESSFUL
>
>
>I can provide any files/debug info try anything needed to help solve the
>problem, any help is greatly appreciated.
>
>Thanks!
>
>-Jason
>
>
>
>
>
>  
>







More information about the samba-technical mailing list