Op 29-06-15 om 10:23 schreef Daniel Carrasco Mar?n:>
> Have Samba4 and Cups permissions to write to /home/temp folder, and to
> run those commands/scripts?.
>
> Greetings!!
>
Hi,
The scripts can be run by anyone (777).
/home/temp had already 777 rights.
I configured the printers to run my scripts, and those do not use CUPS.
But I get this in the log :
2015/06/29 14:19:25.833577, 1, pid=27770, effective(2546, 2513),
real(2546, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
spoolss_EndDocPrinter: struct spoolss_EndDocPrinter
in: struct spoolss_EndDocPrinter
handle : *
handle: struct policy_handle
handle_type : 0x00000000 (0)
uuid :
00001235-0000-0000-9155-cc377a6c0000
[2015/06/29 14:19:25.833707, 6, pid=27770, effective(2546, 2513),
real(2546, 0), class=rpc_srv]
../source3/rpc_server/rpc_handles.c:337(find_policy_by_hnd_internal)
Found policy hnd[2] [0000] 00 00 00 00 35 12 00 00 00 00 00 00 91
55 CC 37 ....5... .....U.7
[0010] 7A 6C 00 00 zl..
[2015/06/29 14:19:25.833802, 6, pid=27770, effective(2546, 2513),
real(2546, 0), class=rpc_srv]
../source3/rpc_server/rpc_handles.c:337(find_policy_by_hnd_internal)
Found policy hnd[2] [0000] 00 00 00 00 35 12 00 00 00 00 00 00 91
55 CC 37 ....5... .....U.7
[0010] 7A 6C 00 00 zl..
[2015/06/29 14:19:25.833881, 4, pid=27770, effective(2546, 2513),
real(2546, 0), class=rpc_srv]
../source3/rpc_server/spoolss/srv_spoolss_nt.c:489(get_printer_snum)
short name:Pdfprinter
[2015/06/29 14:19:25.833932, 10, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:457(print_job_find)
print_job_find: looking up job 9 for share Pdfprinter
[2015/06/29 14:19:25.833993, 8, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:371(unpack_devicemode)
Unpacked devicemode [\\zentyal1\Pdfprinter](A4)
[2015/06/29 14:19:25.834035, 8, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:374(unpack_devicemode)
with a private section of 8220 bytes
[2015/06/29 14:19:25.834070, 10, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:485(print_job_find)
print_job_find: returning system job -1 for jobid 9.
[2015/06/29 14:19:25.834125, 5, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/print_cups.c:918(cups_job_submit)
cups_job_submit(1, 0x7f996addf710)
[2015/06/29 14:19:25.834184, 10, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/print_cups.c:130(cups_connect)
connecting to cups server localhost:631
[2015/06/29 14:19:25.845240, 0, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/print_cups.c:1020(cups_job_submit)
Unable to print file to Pdfprinter - client-error-not-found
[2015/06/29 14:19:25.845945, 10, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:457(print_job_find)
print_job_find: looking up job 9 for share Pdfprinter
[2015/06/29 14:19:25.846131, 8, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:371(unpack_devicemode)
Unpacked devicemode [\\zentyal1\Pdfprinter](A4)
[2015/06/29 14:19:25.846190, 8, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:374(unpack_devicemode)
with a private section of 8220 bytes
[2015/06/29 14:19:25.846244, 10, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:485(print_job_find)
print_job_find: returning system job -1 for jobid 9.
[2015/06/29 14:19:25.846305, 5, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/notify.c:327(send_spoolss_notify2_msg)
send_spoolss_notify2_msg: appending message 0x01/0x0a for printer
Pdfprinter to notify_queue_head
[2015/06/29 14:19:25.846390, 10, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:2127(remove_from_jobs_added)
remove_from_jobs_added: removed jobid 9
[2015/06/29 14:19:25.846448, 10, pid=27770, effective(2546, 2513),
real(2546, 0)] ../source3/printing/printing.c:158(rap_jobid_delete)
rap_jobid_delete: called.
[2015/06/29 14:19:25.846505, 2, pid=27770, effective(2546, 2513),
real(2546, 0), class=rpc_srv]
../source3/rpc_server/spoolss/srv_spoolss_nt.c:5895(_spoolss_EndDocPrinter)
_spoolss_EndDocPrinter: print_job_end failed [NT_STATUS_PRINT_CANCELLED]
[2015/06/29 14:19:25.846563, 1, pid=27770, effective(2546, 2513),
real(2546, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
spoolss_EndDocPrinter: struct spoolss_EndDocPrinter
out: struct spoolss_EndDocPrinter
result : WERR_PRINT_CANCELLED
[2015/06/29 14:19:25.846685, 5, pid=27770, effective(2546, 2513),
real(2546, 0), class=rpc_srv]
../source3/rpc_server/srv_pipe.c:1417(api_rpcTNP)
api_rpcTNP: called \spoolss successfully
It seems samba is trying to give the printjob to cups, but cups can't
find the printer, so the print-job is cancelled.
What to do now ?
Koenraad.