[root@elmo cups]# rpm -qa | grep samba samba-server-3.0.2a-3mdk samba-common-3.0.2a-3mdk samba-client-3.0.2a-3mdk samba-doc-3.0.2a-3mdk [root@elmo cups]# rpm -qa | grep cups cups-common-1.1.20-5mdk cups-1.1.20-5mdk cups-drivers-1.1-131mdk libcups2-1.1.20-5mdk I have put my printer on hold and then printed a job on Windows 98 so that I can see it in the queue. When I right click on the job and select "Cancel Printing" Windows tells me "You do not have permission to modiry this print job." I was logged on Windows as "Bill", my unix id is "bill", and Windows print queue lists the owner of the job as "BILL". With CUPS debug turned on I get this in the error_log: D [21/Mar/2004:01:03:54 -0500] AcceptClient() 11 from localhost:631. D [21/Mar/2004:01:03:54 -0500] ReadClient() 11 POST /jobs HTTP/1.1 E [21/Mar/2004:01:03:54 -0500] cancel_job: "BILL" not authorized to delete job id 47 owned by "root"! D [21/Mar/2004:01:03:54 -0500] Sending error: client-error-forbidden and: [root@elmo cups]# lpq SFN_Cookie is not ready Rank Owner Job File(s) Total Size 1st BILL 46 smbprn.00000028 Printer Test Pa 55296 bytes 2nd BILL 47 smbprn.00000029 Microsoft Word 27648 bytes and when I become "bill": [root@elmo cups]# su - bill [bill@elmo bill]$ lpq SFN_Cookie is not ready Rank Owner Job File(s) Total Size 1st BILL 46 smbprn.00000028 Printer Test Pa 55296 bytes 2nd BILL 47 smbprn.00000029 Microsoft Word 27648 bytes [bill@elmo bill]$ lprm 46 lprm: You don't own job ID 46! the printing stuff from smb.conf: printing = cups printcap name = cups printer admin = @smbusers load printers = yes #### print command = is ignored due to compiled with cups # using client side printer drivers. ; print command = /usr/bin/lpr-cups -r -P %p -J %J -o raw %s # using cups own drivers (use generic PostScript on clients). : print command = /bin/cat %s > /tmp.printed.file ; print command = /usr/bin/lpr-cups -r -P'%p' %s more info: [root@elmo samba]# ldd `which smbd` libldap.so.2 => /usr/lib/libldap.so.2 (0x4002a000) liblber.so.2 => /usr/lib/liblber.so.2 (0x4005c000) libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x40068000) libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x4007d000) libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x400f1000) libcom_err.so.2 => /lib/libcom_err.so.2 (0x40119000) libresolv.so.2 => /lib/libresolv.so.2 (0x4011c000) libcups.so.2 => /usr/lib/libcups.so.2 (0x4012d000) libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x4014b000) libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x4017e000) libnsl.so.1 => /lib/libnsl.so.1 (0x40280000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x40293000) libpam.so.0 => /lib/libpam.so.0 (0x402c0000) libattr.so.1 => /lib/libattr.so.1 (0x402c8000) libacl.so.1 => /lib/libacl.so.1 (0x402cc000) libdl.so.2 => /lib/libdl.so.2 (0x402d4000) libpopt.so.0 => /usr/lib/libpopt.so.0 (0x402d7000) libc.so.6 => /lib/i686/libc.so.6 (0x402df000) libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x40424000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) Why does cups report the owner as "BILL" when my unix is is "bill"? Why does it actually get owned by "root"? I hope I have given you the right information. This problem is reproduceble.
I just tried printing the job again from Windows: D [21/Mar/2004:01:48:08 -0500] print_job: auto-typing file... D [21/Mar/2004:01:48:08 -0500] print_job: request file type is application/postscript. D [21/Mar/2004:01:48:08 -0500] Adding default job-sheets values "none,none"... I [21/Mar/2004:01:48:08 -0500] Adding start banner page "none" to job 48. I [21/Mar/2004:01:48:08 -0500] Adding end banner page "none" to job 48. I [21/Mar/2004:01:48:08 -0500] Job 48 queued on 'SFN_Cookie' by 'root'. D [21/Mar/2004:01:48:08 -0500] Job 48 hold_until = 0 D [21/Mar/2004:01:48:08 -0500] ProcessIPPRequest: 11 status_code=0 D [21/Mar/2004:01:48:08 -0500] CloseClient() 11 Notice that it thinks I'm "root"? [root@elmo cups]# lpstat -o SFN_Cookie-46 BILL 55296 Sun 21 Mar 2004 12:59:57 AM EST SFN_Cookie-47 BILL 27648 Sun 21 Mar 2004 01:03:35 AM EST SFN_Cookie-48 BILL 55296 Sun 21 Mar 2004 01:48:08 AM EST
OK, more testing. When I switch smb.conf to 'printing = sysv': # printing = cups printing = sysv printcap name = cups printer admin = @smbusers load printers = yes #### print command = is ignored due to compiled with cups # using client side printer drivers. ; print command = /usr/bin/lpr-cups -r -P'%p' -J %J -o raw %s # using cups own drivers (use generic PostScript on clients). : print command = /bin/cat %s > /tmp.printed.file print command = /usr/bin/lpr-cups -r -P'%p' -J %J %s I can delete the job: D [21/Mar/2004:09:51:07 -0500] AcceptClient() 10 from localhost:631. D [21/Mar/2004:09:51:07 -0500] [cups-polld 69.29.52.41:631] found 0 classes. D [21/Mar/2004:09:51:07 -0500] [cups-polld 24.159.186.180:631] found 0 classes. D [21/Mar/2004:09:51:07 -0500] ReadClient() 10 POST /jobs HTTP/1.1 D [21/Mar/2004:09:51:07 -0500] CancelJob: id = 48 I [21/Mar/2004:09:51:07 -0500] Job 48 was cancelled by 'BILL'. but when I print the page: D [21/Mar/2004:09:56:12 -0500] AcceptClient() 10 from localhost:631. D [21/Mar/2004:09:56:12 -0500] ReadClient() 10 POST /printers/SFN_Cookie HTTP/1.1 D [21/Mar/2004:09:56:12 -0500] print_job: auto-typing file... D [21/Mar/2004:09:56:12 -0500] print_job: request file type is application/postscript. D [21/Mar/2004:09:56:12 -0500] check_quotas: requesting-user-name = 'BILL' I [21/Mar/2004:09:56:12 -0500] Denying user "BILL" access to printer "SFN_Cookie"... D [21/Mar/2004:09:56:12 -0500] Sending error: client-error-not-possible but if I add "BILL" as an "AllowUser" with lpadmin -u allow:BILL -p SFN_Cookie: D [21/Mar/2004:09:57:49 -0500] AcceptClient() 10 from localhost:631. D [21/Mar/2004:09:57:49 -0500] ReadClient() 10 POST /printers/SFN_Cookie HTTP/1.1 D [21/Mar/2004:09:57:49 -0500] print_job: auto-typing file... D [21/Mar/2004:09:57:49 -0500] print_job: request file type is application/postscript. D [21/Mar/2004:09:57:49 -0500] check_quotas: requesting-user-name = 'BILL' D [21/Mar/2004:09:57:49 -0500] print_job: requesting-user-name = 'BILL' D [21/Mar/2004:09:57:49 -0500] Adding default job-sheets values "none,none"... I [21/Mar/2004:09:57:49 -0500] Adding start banner page "none" to job 49. I [21/Mar/2004:09:57:49 -0500] Adding end banner page "none" to job 49. I [21/Mar/2004:09:57:49 -0500] Job 49 queued on 'SFN_Cookie' by 'BILL'. D [21/Mar/2004:09:57:49 -0500] Job 49 hold_until = 0 Looks like the SAMBA->CUPS interface changing the name to upper case is definately causing a problem. Note, one other change I made with this test: I changed all relevant CUPS <Location>'s to effectively 'Allow from all'. And now I am able to: [root@elmo cups]# su - bill [bill@elmo bill]$ lpstat -o SFN_Cookie-46 BILL 55296 Sun 21 Mar 2004 12:59:57 AM EST SFN_Cookie-47 BILL 27648 Sun 21 Mar 2004 01:03:35 AM EST SFN_Cookie-49 BILL 80896 Sun 21 Mar 2004 09:57:49 AM EST [bill@elmo bill]$ lprm 46 [bill@elmo bill]$ lprm 47 [bill@elmo bill]$ lprm 49
Cannot reproduce this with the latest 3.0 cvs tree. The patches for bug 1147 and bug 1007 were included in 3.0.3pre1. I believe that what you are seeing has been fixed. Please reopen if you can reproduce this against 3.0.3pre1.
This is still happening on: [root@elmo cups]# rpm -qa | grep samba samba-common-3.0.13-2mdk samba-doc-3.0.13-2mdk samba-server-3.0.13-2mdk samba-client-3.0.13-2mdk And now on this release of samba I can not view the queued print job in Win98. CUPS log file with debug says: E [13/Jun/2005:14:36:44 -0400] get_jobs: resource name '/printers//usr/bin/lpq-cups -P'SFN_Cookie'' no good! But from the command line: [bill@elmo source]$ lpq -P'SFN_Cookie' SFN_Cookie is not ready Rank Owner Job File(s) Total Size 1st BILL 5 smbprn.00000051 Printer Test Pa 62464 bytes 2nd BILL 6 smbprn.00000052 Printer Test Pa 62464 bytes
Bill, please attach your smb.conf. This shouldn't be happening > E [13/Jun/2005:14:36:44 -0400] get_jobs: resource name > '/printers//usr/bin/lpq-cups -P'SFN_Cookie'' no good!
Created attachment 1271 [details] My smb.conf per your request Here's my smb.conf
Created attachment 1272 [details] My cups printers.conf just in case you need it CUPS is a great printing tool if you leave the security wide open. But as soon as you try to limit who can print where you run into all kinds of problems. (I would love it if someone out there could show me it's just my configuration.) Currently, my cups printing is wide open. I have multiple sites. I'm relying on my firewall to keep unauthorized ppl out. However, within an authorized site, I find I can put no limits on users without breaking something. As you can see from my printers.conf, user BILL should be able to cancel a print job but the job no longer shows up when I view the print queue from Win98.
This is an accidental misconfiguration. Remove these lines from smb.conf lpq command = /usr/bin/lpq-cups -P'%p' lprm command = /usr/bin/lrpm-cups -P'%p' %j lppause command = /usr/bin/lp-cups -i %j -H hold lpresume command = /usr/bin/lp-cups -i %j -H resume queuepause command = /usr/bin/disable %p queueresume command = /usr/bin/enable %p We use the lpq command to pass the printer name to the background lpq update process.
actually is still fixed in light of recent reports.
(In reply to comment #8) > This is an accidental misconfiguration. Remove these > lines from smb.conf > > lpq command = /usr/bin/lpq-cups -P'%p' > lprm command = /usr/bin/lrpm-cups -P'%p' %j > lppause command = /usr/bin/lp-cups -i %j -H hold > lpresume command = /usr/bin/lp-cups -i %j -H resume > queuepause command = /usr/bin/disable %p > queueresume command = /usr/bin/enable %p > > We use the lpq command to pass the printer name to the > background lpq update process. I commented those out in smb.conf, but I still get upper case user id in Win98: [root@elmo ~]# lpq SFN_Cookie is not ready Rank Owner Job File(s) Total Size 1st BILL 1 smbprn.00000053 Printer Test Pa 62464 bytes 2nd bill 2 smbprn.00000054 Test Page 122880 bytes 3rd BILL 3 smbprn.00000055 Printer Test Pa 62464 bytes 4th BILL 4 smbprn.00000056 Printer Test Pa 62464 bytes [root@elmo ~]# With smb.conf changed, Job 1 is Win98 before reboot of Win98 machine. Job 2 is print from Windows XP. Jobs 3 & 4 are after Win98 reboot. As a side note, none of the jobs show up in the queue on Win98 or WinXP. A cups debug2 shows: d [15/Jul/2005:17:48:56 -0400] AcceptClient(lis=0x808c5c0) 0 NumClients = 1 D [15/Jul/2005:17:48:56 -0400] AcceptClient: 7 from localhost:631. d [15/Jul/2005:17:48:56 -0400] AcceptClient: Adding fd 7 to InputSet... d [15/Jul/2005:17:48:56 -0400] ReadClient: 7, used=0, file=-1 D [15/Jul/2005:17:48:56 -0400] ReadClient: 7 POST / HTTP/1.1 d [15/Jul/2005:17:48:56 -0400] decode_auth(0xb7b2dc3c): Authorization string = "" d [15/Jul/2005:17:48:56 -0400] decode_auth: 7 username="" d [15/Jul/2005:17:48:56 -0400] IsAuthorized: con->uri = "/" d [15/Jul/2005:17:48:56 -0400] FindBest: uri = "/"... d [15/Jul/2005:17:48:56 -0400] FindBest: Location /admin Limit 7f d [15/Jul/2005:17:48:56 -0400] FindBest: Location / Limit 7f d [15/Jul/2005:17:48:56 -0400] FindBest: Location /printers/SFN_Cookie Limit 7f d [15/Jul/2005:17:48:56 -0400] FindBest: Location CUPS_INTERNAL_BROWSE_ACL Limit 0 d [15/Jul/2005:17:48:56 -0400] FindBest: best = "/" d [15/Jul/2005:17:48:56 -0400] IsAuthorized: auth = 0, satisfy=0... d [15/Jul/2005:17:48:56 -0400] POST / d [15/Jul/2005:17:48:56 -0400] CONTENT_TYPE = application/ipp d [15/Jul/2005:17:48:56 -0400] ReadClient: 7 con->data_encoding = length, con->data_remaining = 293, con->file = -1 d [15/Jul/2005:17:48:56 -0400] ProcessIPPRequest(0xb7b2dc3c[7]): operation_id = 000a d [15/Jul/2005:17:48:56 -0400] ProcessIPPRequest: URI="ipp://localhost/printers//usr/bin/lpq-cups -P'SFN_Cookie'" d [15/Jul/2005:17:48:56 -0400] get_jobs(0xb7b2dc3c[7], ipp://localhost/printers//usr/bin/lpq-cups -P'SFN_Cookie') E [15/Jul/2005:17:48:56 -0400] get_jobs: resource name '/printers//usr/bin/lpq-cups -P'SFN_Cookie'' no good! d [15/Jul/2005:17:48:56 -0400] send_ipp_error(0xb7b2dc3c[7], 406) D [15/Jul/2005:17:48:56 -0400] Sending error: client-error-not-found D [15/Jul/2005:17:48:56 -0400] ProcessIPPRequest: 7 status_code=406 d [15/Jul/2005:17:48:56 -0400] ProcessIPPRequest: Adding fd 7 to OutputSet... d [15/Jul/2005:17:48:56 -0400] WriteClient: Removing fd 7 from OutputSet... d [15/Jul/2005:17:48:56 -0400] ReadClient: 7, used=0, file=-1 d [15/Jul/2005:17:48:56 -0400] ReadClient: httpGets returned EOF... D [15/Jul/2005:17:48:56 -0400] CloseClient: 7 d [15/Jul/2005:17:48:56 -0400] CloseClient: Removing fd 7 from InputSet and OutputSet... What Windows do you use, XP? Can you put the printer on hold and then print something and see it in the queue two minutes later? Bill
(In reply to comment #11) > (In reply to comment #8) <snip> > Here is the debug2 from the command line: /usr/bin/lpq-cups -P'SFN_Cookie' d [15/Jul/2005:18:06:20 -0400] ReadClient: 7, used=0, file=-1 D [15/Jul/2005:18:06:20 -0400] ReadClient: 7 POST / HTTP/1.1 d [15/Jul/2005:18:06:20 -0400] decode_auth(0xb7b2dc3c): Authorization string = "" d [15/Jul/2005:18:06:20 -0400] decode_auth: 7 username="" d [15/Jul/2005:18:06:20 -0400] IsAuthorized: con->uri = "/" d [15/Jul/2005:18:06:20 -0400] FindBest: uri = "/"... d [15/Jul/2005:18:06:20 -0400] FindBest: Location /admin Limit 7f d [15/Jul/2005:18:06:20 -0400] FindBest: Location / Limit 7f d [15/Jul/2005:18:06:20 -0400] FindBest: Location /printers/SFN_Cookie Limit 7f d [15/Jul/2005:18:06:20 -0400] FindBest: Location CUPS_INTERNAL_BROWSE_ACL Limit 0 d [15/Jul/2005:18:06:20 -0400] FindBest: best = "/" d [15/Jul/2005:18:06:20 -0400] IsAuthorized: auth = 0, satisfy=0... d [15/Jul/2005:18:06:20 -0400] POST / d [15/Jul/2005:18:06:20 -0400] CONTENT_TYPE = application/ipp d [15/Jul/2005:18:06:20 -0400] ReadClient: 7 con->data_encoding = length, con->data_remaining = 131, con->file = -1 d [15/Jul/2005:18:06:20 -0400] ProcessIPPRequest(0xb7b2dc3c[7]): operation_id = 000a d [15/Jul/2005:18:06:20 -0400] ProcessIPPRequest: URI="ipp://localhost/printers/SFN_Cookie" d [15/Jul/2005:18:06:20 -0400] get_jobs(0xb7b2dc3c[7], ipp://localhost/printers/SFN_Cookie) d [15/Jul/2005:18:06:20 -0400] get_jobs: job->id = 1 d [15/Jul/2005:18:06:20 -0400] get_jobs: count = 1 plus tons more... Notice the difference in the URI? Bill
I'm not trying to belabor the point here but: smbd [15/Jul/2005:17:48:56 -0400] get_jobs(0xb7b2dc3c[7], ipp://localhost/printers//usr/bin/lpq-cups -P'SFN_Cookie') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tells me that you either didn't completely remove the lpq command or didn't restart after you did. The printing hook commands are a little finicky. Make sure you restart smbd. The upper case username is what Windows sent us. And I've tested this with Windows 98, Windows NT, Windows 2000, and Windows XP.
(In reply to comment #13) > I'm not trying to belabor the point here but: > belabor if you need to! > smbd [15/Jul/2005:17:48:56 -0400] get_jobs(0xb7b2dc3c[7], > ipp://localhost/printers//usr/bin/lpq-cups -P'SFN_Cookie') > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > tells me that you either didn't completely remove the > lpq command or didn't restart after you did. The printing > hook commands are a little finicky. Make sure you restart > smbd. > > The upper case username is what Windows sent us. > > And I've tested this with Windows 98, Windows NT, Windows 2000, > and Windows XP. > Thank you, I restarted smbd and now I can see what is in the queue. I had rebooted Win98 thinking that it would spawn a new smbd for me and that would be enough. Seems I don't know as much as I thought I did. :-) I still can not delete from the queue the print I create because it has an owner name of uppercase BILL. You seem to be blaming this on Win98. If this is so, then why is the request to delete the print not also folded to uppercase which would work. I don't understand. I logon to Windows as "Bill" so it would seem that samba knows my unix name because it correctly spawns a task as "bill". If samba knows I am unix "bill", then why can't it create print as "bill" even if Windows 98 is giving it "BILL"? Samba gets this right for Windows XP even though I logon there as "Bill". Bill
This works in the current 3.0.20a to-be-released code. Have test LPRng and CUPS.