[gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
"Richard Fish" <[EMAIL PROTECTED]> writes: >> Richard what do you make of the fact that I cannot connect to cups >> with the normal http://locahost:631? > > Actually, you "connect" to it fine, it just has nothing to show you... > >> Will get a connection, but in the past a simple: >> http://localhost:631 was enough. >> >> That now gets a 404 Not Found > > What is DocumentRoot set to in /etc/cups/cupsd.conf? Try setting it > to /usr/share/cups/html. Haa.. you nailed it again. It comes set to /usr/share/cups/doc But needs: /usr/share/cups/html I guess that would be a tiny bug. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
On 9/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Richard what do you make of the fact that I cannot connect to cups with the normal http://locahost:631? Actually, you "connect" to it fine, it just has nothing to show you... Will get a connection, but in the past a simple: http://localhost:631 was enough. That now gets a 404 Not Found What is DocumentRoot set to in /etc/cups/cupsd.conf? Try setting it to /usr/share/cups/html. -Richard -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
"Richard Fish" <[EMAIL PROTECTED]> writes: > On 9/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Richard, I'm sorry it seems I've really wasted lots of your time here. >> However I don't think this is the only problem. I really hope there >> is not some other moronic user miconfig... > > np. I missed it too for several messages. :-) > >> I'm still unable to print (EVEN WITH THAT CURSED URL FIXED). > > I think the problem here is that my script is screwing things up. I > actually had no idea what $0 would be in this case (thus the note that > "this is just a guess" ;-)). It looks like when cups is calling > smbspool, $0 is the name of the program, and not the URI of the device > (see man smbspool to understand why I was uncertain here!). And I am > changing DEVICE_URI to be whatever $0 was...which is wrong. > > So the fixed script should be > > -- > #!/bin/bash > tmpfile=/tmp/smbspool.$$ > echo $0:$1:$2:$3:$4:$5:$6:$7 > $tmpfile > env >>$tmpfile > > /usr/bin/smbspool.bin $1 $2 $3 $4 $5 $6 >>$tmpfile > -- > > But actually at this point I think you can just move smbspool.bin back > to smbspool, and things should work ok. Ok... and away we go... printing works now. Richard what do you make of the fact that I cannot connect to cups with the normal http://locahost:631? I've seen a few posts here from others who have noticed it too. http://localhost:631/admin or http://localhost:631/help Will get a connection, but in the past a simple: http://localhost:631 was enough. That now gets a 404 Not Found error_log has this: D [17/Sep/2006:06:40:22 -0500] cupsdReadClient: 7 Browser asked for language "en-us.utf-8"... D [17/Sep/2006:06:40:22 -0500] cupsdAuthorize: No authentication data provided. D [17/Sep/2006:06:40:22 -0500] cupsdSendError: 7 code=404 (Not Found) D [17/Sep/2006:06:40:23 -0500] cupsdCloseClient: 7 D [17/Sep/2006:06:40:23 -0500] cupsdAcceptClient: 7 from localhost:631 (IPv4) D [17/Sep/2006:06:40:23 -0500] cupsdReadClient: 7 GET /cups.css HTTP/1.1 D [17/Sep/2006:06:40:23 -0500] cupsdReadClient: 7 Browser asked for language "en-us.utf-8"... D [17/Sep/2006:06:40:23 -0500] cupsdAuthorize: No authentication data provided. D [17/Sep/2006:06:40:23 -0500] cupsdSendError: 7 code=404 (Not Found) D [17/Sep/2006:06:40:23 -0500] cupsdCloseClient: 7 D [17/Sep/2006:06:40:23 -0500] cupsdAcceptClient: 7 from localhost:631 (IPv4) D [17/Sep/2006:06:40:23 -0500] cupsdReadClient: 7 GET /favicon.ico HTTP/1.1 D [17/Sep/2006:06:40:23 -0500] cupsdReadClient: 7 Browser asked for language "en-us.utf-8"... D [17/Sep/2006:06:40:23 -0500] cupsdAuthorize: No authentication data provided. D [17/Sep/2006:06:40:23 -0500] cupsdSendError: 7 code=404 (Not Found) D [17/Sep/2006:06:40:23 -0500] cupsdCloseClient: 7 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
On 9/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Richard, I'm sorry it seems I've really wasted lots of your time here. However I don't think this is the only problem. I really hope there is not some other moronic user miconfig... np. I missed it too for several messages. :-) I'm still unable to print (EVEN WITH THAT CURSED URL FIXED). I think the problem here is that my script is screwing things up. I actually had no idea what $0 would be in this case (thus the note that "this is just a guess" ;-)). It looks like when cups is calling smbspool, $0 is the name of the program, and not the URI of the device (see man smbspool to understand why I was uncertain here!). And I am changing DEVICE_URI to be whatever $0 was...which is wrong. So the fixed script should be -- #!/bin/bash tmpfile=/tmp/smbspool.$$ echo $0:$1:$2:$3:$4:$5:$6:$7 > $tmpfile env >>$tmpfile /usr/bin/smbspool.bin $1 $2 $3 $4 $5 $6 >>$tmpfile -- But actually at this point I think you can just move smbspool.bin back to smbspool, and things should work ok. Cheers, -Richard -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
"Richard Fish" <[EMAIL PROTECTED]> writes: > On 9/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> DEVICE_URI=smb://reader:[EMAIL PROTECTED]/chub-print) > > And *now* see the problem. > > There should absolutely positively *not* be a ')' at the end of this > line. You need to fix printers.conf to remove this. Sigh...so much > work for such a silly little problem. Richard, I'm sorry it seems I've really wasted lots of your time here. However I don't think this is the only problem. I really hope there is not some other moronic user miconfig... It's really a kick in the pants that my very first post on this thread Showed that stupid typo... I never would have seen it I guess, if you had not. But it was there in my very first post... looking back it appears glaringly right their in my posted `printers.conf'. It seems bad to me that something in cups error output did not point to that misconstrued URL. In fact, going further... I see literally thousands of lines appear in error_log (in debug mode) that are not error lines at all. Then the actual error lines are nearly useless in tracking down a problem. I'm still unable to print (EVEN WITH THAT CURSED URL FIXED). It may be too much to expect you to still hang in there with this problem so please tell me you've had enough if that is the case. If you are still willing... (and I cannot guarantee there is not some other horribly stupid user error) what can I post that will help diagnose this inability to print? I've posted below error_log excerpt, /tmp file content. smbclient connection to chub-print (at the very end) Why doesn't cups debug output give us some better diagnostic information? Can you see some other really stupid typo or something else in this output? Actual error lines from /var/log/cups/error_log: [... skipped Four more of these Connect messages above] E [16/Sep/2006:20:48:26 -0500] [Job 51] Unable to connect to CIFS host, will retry in 60 seconds... E [16/Sep/2006:20:49:26 -0500] [Job 51] Unable to connect to CIFS host after (tried 3 times) E [16/Sep/2006:20:49:26 -0500] PID 10109 (/usr/libexec/cups/backend/smb) stopped with status 1! E [16/Sep/2006:20:49:27 -0500] PID 10108 (/usr/libexec/cups/filter/foomatic-rip) stopped with status 9! After this attempt chub-print gets turned off as revealed by lpq: # lpq chub-print is not ready RankOwner Job File(s) Total Size 1st reader 51 file2048 bytes Turning printer off on error is not in my printers.conf (remvoed by me) The /tmp file from this print attempt: /usr/libexec/cups/backend/smb:50:reader:file:1:job-uuid=urn:uuid:e3a19e12-d965-3164-57e1-f3f92cea54ec:: IPP_PORT=631 TMPDIR=/var/spool/cups/tmp CUPS_FONTPATH=/usr/share/cups/fonts CUPS_DOCROOT=/usr/share/cups/docs USER=root CUPS_SERVERROOT=/etc/cups SOFTWARE=CUPS/1.2.3 CUPS_CACHEDIR=/var/cache/cups DEVICE_URI=smb://reader:[EMAIL PROTECTED]/chub-print PATH=/usr/libexec/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin CUPS_REQUESTROOT=/var/spool/cups PWD=/ [EMAIL PROTECTED] PPD=/etc/cups/ppd/chub-print.ppd LANG=en_US CUPS_ENCRYPTION=IfRequested SHLVL=1 CUPS_DATADIR=/usr/share/cups PRINTER=chub-print FINAL_CONTENT_TYPE=printer/chub-print RIP_MAX_CACHE=8m CONTENT_TYPE=text/plain CUPS_SERVER=localhost CHARSET=utf-8 CUPS_STATEDIR=/var/run/cups CUPS_SERVERBIN=/usr/libexec/cups _=/usr/bin/env WARNING: The "printer admin" option is deprecated added interface ip=192.168.0.4 bcast=192.168.0.255 nmask=255.255.255.0 cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) [... snipped 7 more identicle lines] Note that smbclient can connect as user reader to chub-print with no problem. smbclient //chub/chub-print -Ureader WARNING: The "printer admin" option is deprecated Password: XX Domain=[CHUB] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] smb: \> -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
On 9/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: DEVICE_URI=smb://reader:[EMAIL PROTECTED]/chub-print) And *now* see the problem. There should absolutely positively *not* be a ')' at the end of this line. You need to fix printers.conf to remove this. Sigh...so much work for such a silly little problem. -Richard -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
"Richard Fish" <[EMAIL PROTECTED]> writes: > On 9/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> ls -l /usr/libexec/cups/backend/smb >> lrwxrwxrwx [...] /usr/libexec/cups/backend/smb -> /usr/bin/smbspool > > Ok. Are you specifying a ServerBin directory in /etc/cups/cupsd.conf? > It should point to /usr/libexec/cups if you are. No. That stuff is commented out. grep 'ServerBin' /etc/cups/cupsd.conf # ServerBin: the root directory for the scheduler executables. #ServerBin /usr/lib/cups So that should default to the right place right? > > Also, I hope you fixed the bug in the script that I postedthe call > to /usr/bin/smbspool should of course be for smbspool.bin. :-( Egad, no I missed that. contents of smb* files below. There were two. I've printed the first one below. The second one is identicle except for the first line which is shown in a diff at the end. But it appears the main thing of note is this line: cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) Which appears to show that cups is trying to connect 0.0.0.0 which is usally interpreted as localhost I think. Is that wrong or indicating some config problem further up the chain of command? /tmp/smb.32258 /usr/libexec/cups/backend/smb:45:reader:file:1:job-uuid=urn:uuid:\ 662a44c4-890f-32b0-7d15-3bb4b60e7fe1:: IPP_PORT=631 TMPDIR=/var/spool/cups/tmp CUPS_FONTPATH=/usr/share/cups/fonts CUPS_DOCROOT=/usr/share/cups/docs USER=root CUPS_SERVERROOT=/etc/cups SOFTWARE=CUPS/1.2.3 CUPS_CACHEDIR=/var/cache/cups DEVICE_URI=smb://reader:[EMAIL PROTECTED]/chub-print) PATH=/usr/libexec/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin CUPS_REQUESTROOT=/var/spool/cups PWD=/ [EMAIL PROTECTED] PPD=/etc/cups/ppd/chub-print.ppd LANG=en_US CUPS_ENCRYPTION=IfRequested SHLVL=1 CUPS_DATADIR=/usr/share/cups PRINTER=chub-print FINAL_CONTENT_TYPE=printer/chub-print RIP_MAX_CACHE=8m CONTENT_TYPE=text/plain CUPS_SERVER=localhost CHARSET=utf-8 CUPS_STATEDIR=/var/run/cups CUPS_SERVERBIN=/usr/libexec/cups _=/usr/bin/env WARNING: The "printer admin" option is deprecated added interface ip=192.168.0.4 bcast=192.168.0.255 nmask=255.255.255.0 cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) cli_start_connection: failed to connect to CUPS<20> (0.0.0.0) # diff smbspool.32258 smbspool.32277 1c1 < /usr/libexec/cups/backend/smb:45:reader:file:1:job-uuid=urn:uuid:662a44c4-890f-32b0-7d15-3bb4b60e7fe1:: > /usr/libexec/cups/backend/smb:46:reader:file:1:job-uuid=urn:uuid:a13fa658-6d11-3e1b-5ab2-ce62f968dc26:: -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
On 9/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ls -l /usr/libexec/cups/backend/smb lrwxrwxrwx [...] /usr/libexec/cups/backend/smb -> /usr/bin/smbspool Ok. Are you specifying a ServerBin directory in /etc/cups/cupsd.conf? It should point to /usr/libexec/cups if you are. Also, I hope you fixed the bug in the script that I postedthe call to /usr/bin/smbspool should of course be for smbspool.bin. :-( -Richard -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
"Richard Fish" <[EMAIL PROTECTED]> writes: > On 9/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Something isn't working as planned. There were no files produced in >> /tmp. > > Odd. Where does /usr/libexec/cups/backend/smb point to? I did check that as you suggested, before replacing smbspool. ls -l /usr/libexec/cups/backend/smb lrwxrwxrwx [...] /usr/libexec/cups/backend/smb -> /usr/bin/smbspool -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
On 9/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Something isn't working as planned. There were no files produced in /tmp. Odd. Where does /usr/libexec/cups/backend/smb point to? -Richard -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
[EMAIL PROTECTED] writes: > Printing failed as expected but nothing was produced in /tmp. Adding #!/bin/bash -x to the smbspool script and I don't see any output when running lp file I'm not sure the output would be visible from -x in my tty but I'm guessing smbspool is not being called. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
On 9/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hmm, do you get something similar if you do: > > DEVICE_URI=smb://reader:[EMAIL PROTECTED]/chub-print > export DEVICE_URI > /usr/bin/smbspool 0 reader test 1 0 /etc/fstab Well, that tried to print something at least. Somekind of stepping problem seems to have prevented a real print. I got 2 pages. one page with the first and second line of fstab. The second line was indented about half a page. Then a blank page. Ok, that's good. The staircasing is easily explained/fixed, but not really important. Mostly we are just interested in the fact that that command did connect and try and print. First, do an "ls -l /usr/libexec/cups/backend/smb" It should be a symbolic link pointing to /usr/bin/smbspool. If it is, then we need to see what the differences are between running that command directly vs the way cups runs it. We can use some shell script trickery to do this: 1. mv /usr/bin/smbspool /usr/bin/smbspool.bin 2. $EDITOR /usr/bin/smbspool Make a new script that contains: -- #!/bin/bash tmpfile=/tmp/smbspool.$$ echo $0:$1:$2:$3:$4:$5:$6:$7 > $tmpfile env >>$tmpfile # this part is just a guess.. export DEVICE_URI=$0 /usr/bin/smbspool $1 $2 $3 $4 $5 $6 >>$tmpfile -- 3. chmod 755 /usr/bin/smbspool Try printing again through cups. After the failure, you should have one or more /tmp/smbspool.* files. Post one of those here, although you may want to inspect it first and mask out anything that reveals your password! -Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
On 9/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: First let me show that a connection is definately in working order: Hmm, do you get something similar if you do: DEVICE_URI=smb://reader:[EMAIL PROTECTED]/chub-print export DEVICE_URI /usr/bin/smbspool 0 reader test 1 0 /etc/fstab -Richard -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
"Richard Fish" <[EMAIL PROTECTED]> writes: > On 9/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> State Stopped > > I'm guessing that this is your problem. What does "lpc status" > report? Does "cupsenable chub-print" help? lpc status first reported: chub-print: printer is on device 'smb' speed -1 queuing is enabled printing is disabled no entries daemon present As you see, `disabled' but why would that be? My config doesn't mention enable/disable and in the past I simply ran the cupsd service or not to turn off/on. Something new? So I thought it might just start working after: cupsenable chub-print But I guess it is not going to. After running `cupsenable chub-print' and attempting to print a job the log output in error_log contains thousands of lines of output from just one attempt. Among them grepping for the Error lines I see stuff indicating a connection was not allowed. That output in a moment. First let me show that a connection is definately in working order: smbclient -L //chub -Ureader |grep print WARNING: The "printer admin" option is deprecated Password: Domain=[CHUB] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Domain=[CHUB] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] print$ Disk Printer Drivers chub-print Printer HP Officejet 7400 series smbclient //chub/chub-print -U reader WARNING: The "printer admin" option is deprecated Password: Domain=[CHUB] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] smb: \> The share is there and can be accessed with smbclient After attempting to print, a few minutes pass and a new look with lpc status: Shows printing is now disabled again. Partial Error_log output follows: grep ^E /var/log/cups/error_log (Note: Many in-between lines are skipped and those printed are wrapped for mail) E [13/Sep/2006:19:44:53 -0500] [Job 24] Tree connect failed (NT_STATUS_BAD_NETWORK_NAME) E [13/Sep/2006:19:44:53 -0500] [Job 24] No ticket cache found for userid=1000 E [13/Sep/2006:19:44:53 -0500] [Job 24] Can not get the ticket cache for reader E [13/Sep/2006:19:44:53 -0500] [Job 24] Session setup failed: NT_STATUS_LOGON_FAILURE E [13/Sep/2006:19:44:53 -0500] [Job 24] Tree connect failed (NT_STATUS_BAD_NETWORK_NAME) E [13/Sep/2006:19:44:53 -0500] [Job 24] Unable to connect to CIFS host, will retry in 60 seconds... E [13/Sep/2006:19:45:53 -0500] [Job 24] Tree connect failed (NT_STATUS_BAD_NETWORK_NAME) E [13/Sep/2006:19:45:53 -0500] [Job 24] No ticket cache found for userid=1000 E [13/Sep/2006:19:45:53 -0500] [Job 24] Can not get the ticket cache for reader E [13/Sep/2006:19:45:53 -0500] [Job 24] Session setup failed: NT_STATUS_LOGON_FAILURE E [13/Sep/2006:19:45:53 -0500] [Job 24] Tree connect failed (NT_STATUS_BAD_NETWORK_NAME) E [13/Sep/2006:19:45:53 -0500] [Job 24] Unable to connect to CIFS host, will retry in 60 seconds... E [13/Sep/2006:19:46:53 -0500] [Job 24] Tree connect failed (NT_STATUS_BAD_NETWORK_NAME) E [13/Sep/2006:19:46:53 -0500] [Job 24] No ticket cache found for userid=1000 E [13/Sep/2006:19:46:53 -0500] [Job 24] Can not get the ticket cache for reader E [13/Sep/2006:19:46:53 -0500] [Job 24] Session setup failed: NT_STATUS_LOGON_FAILURE E [13/Sep/2006:19:46:53 -0500] [Job 24] Tree connect failed (NT_STATUS_BAD_NETWORK_NAME) E [13/Sep/2006:19:46:53 -0500] [Job 24] Unable to connect to CIFS host, will retry in 60 seconds... E [13/Sep/2006:19:47:53 -0500] [Job 24] Unable to connect to CIFS host after (tried 3 times) E [13/Sep/2006:19:47:53 -0500] PID 15252 (/usr/libexec/cups/backend/smb) stopped with status 1! E [13/Sep/2006:19:47:54 -0500] PID 15251 (/usr/libexec/cups/filter/foomatic-rip) stopped with status 9! -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: [OT] print to printer on winxp via cups samba smb
Mick <[EMAIL PROTECTED]> writes: > I'm afraid I can't answer your question directly because I do not use Samba, > but if you search this list you'll find an answer as to how to set your WinXP > box as a server for *nix machines and share the printer that way. The Samba > interface adds one more layer of complexity and probability for error. > > Make sure you only allow the specific Linux box IP address to connect to your > WinXP box (set it up in the WinXP firewall). I did find a previous post of yours alluding to an earlier post but that post of yours does give sort of brief howto. http://thread.gmane.org/gmane.linux.gentoo.user/166004/focus=166061 I'm going to pursue samba solutions first since I have done that several times and it mostly just worked for me when I made a few config settings. I've never really had trouble getting printing to work thru samba until now and have setup it up at least 5-6 times. The method you propose in the URL above does sound interesting and I may give it a try just to compare it to the samba approach. Thanks -- gentoo-user@gentoo.org mailing list