Bug 104136 - SAMBA client working, printer configuration not working
Summary: SAMBA client working, printer configuration not working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: samba
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact:
URL:
Whiteboard:
: 121290 (view as bug list)
Depends On:
Blocks: 132991
TreeView+ depends on / blocked
 
Reported: 2003-09-10 13:58 UTC by Rick Graves
Modified: 2014-08-31 23:25 UTC (History)
12 users (show)

Fixed In Version: samba-3.0.9-1.3E.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-01 16:46:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
CUPS error log file as requested (1.46 KB, text/plain)
2003-10-02 11:38 UTC, Rick Graves
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:276 0 normal SHIPPED_LIVE Updated printer configuration tool fixes SMB problems 2003-09-17 04:00:00 UTC

Description Rick Graves 2003-09-10 13:58:37 UTC
Description of problem:

Tim Waugh at RedHat suggested that I post the issue in bugzilla.

I want to print to an hp LaserJet 1200 on a Windows XP box.  

I can print calling the SAMBA client directly from a terminal window.  That 
works OK.

When I try to install the printer using the printer configuration, I only get 
the message:

Unable to connect to SAMBA host, will retry in 60 seconds...

So I cannot print in X/KDE (except from a terminal window by calling the SAMBA 
client directly).  


Version-Release number of selected component (if applicable):
redhat-config-printer-0.6.47.9-1.i386.rpm

How reproducible:
Problem occurs all the time continuously.


Steps to Reproduce:
1. Try to install the LaserJet 1200 (connected to a Windows XP box) using the 
printer configuration utility.
2.
3.
    
Actual results:
Printer configuration always says only this:

Unable to connect to SAMBA host, will retry in 60 seconds... 


Expected results:
Printer should install and be ready to print.


Additional info:
output of printconf-tui --Xexport

  <?xml version="1.0" ?> 
- <adm_context VERSION="0">
- <id NAME="local" SERIAL="1063073839">
  <null /> 
  <null /> 
  </id>
- <datatree>
- <printconf TYPE="LIST">
- <print_queues TYPE="LIST">
- <hpLJ1200 ATOMIC="TRUE" TYPE="LIST">
  <alias_list ANONYMOUS="TRUE" TYPE="LIST" /> 
  <queue_description TYPE="STRING" VALUE="hp LaserJet 1200 on HeadOffice" /> 
- <lpoptions TYPE="LIST">
  <page-bottom TYPE="STRING" VALUE="36" /> 
  <cpi TYPE="STRING" VALUE="12" /> 
  <lpi TYPE="STRING" VALUE="7" /> 
  <scaling TYPE="STRING" VALUE="100" /> 
  <page-right TYPE="STRING" VALUE="36" /> 
  <page-left TYPE="STRING" VALUE="36" /> 
  <wrap TYPE="STRING" VALUE="true" /> 
  <page-top TYPE="STRING" VALUE="36" /> 
  </lpoptions>
  <queue_type TYPE="STRING" VALUE="SMB" /> 
- <queue_data TYPE="LIST">
  <smb_share TYPE="STRING" VALUE="//HEADOFFICE/hpLJ1200" /> 
  <smb_ip TYPE="STRING" VALUE="192.168.0.3" /> 
  <smb_workgroup TYPE="STRING" VALUE="ADVANCED" /> 
  <smb_user TYPE="STRING" VALUE="" /> 
  <smb_password TYPE="STRING" VALUE="" /> 
  <smb_translate TYPE="BOOL" VALUE="FALSE" /> 
  </queue_data>
- <filter_data TYPE="LIST">
  <mf_type TYPE="STRING" VALUE="MFOMATIC" /> 
- <flags TYPE="LIST">
  <assume_data_is_text TYPE="BOOL" VALUE="FALSE" /> 
  <rerender_Postscript TYPE="BOOL" VALUE="FALSE" /> 
  <convert_text_to_Postscript TYPE="BOOL" VALUE="TRUE" /> 
  </flags>
  <printer_id TYPE="STRING" VALUE="Generic-PostScript_Printer" /> 
  <gs_driver TYPE="STRING" VALUE="Postscript" /> 
  <foomatic_defaults ANONYMOUS="TRUE" TYPE="LIST" /> 
  </filter_data>
  <filter_type TYPE="STRING" VALUE="MAGICFILTER" /> 
  </hpLJ1200>
  </print_queues>
  </printconf>
  </datatree>
  </adm_context>

Comment 1 Tim Waugh 2003-09-10 14:08:53 UTC
What does this say?:

smbclient //HEADOFFICE/hpLJ1200 -W ADVANCED -N -P -c quit


Comment 2 Rick Graves 2003-09-10 14:34:23 UTC
Tim,

You asked, 

> What does this say?:

> smbclient //HEADOFFICE/hpLJ1200 -W ADVANCED -N -P -c quit

I got this command from my book "RedHat Linux 8 Bible".  That is the command I 
typed into the terminal window to test whether the SAMBA client is working.  

The printer is hpLJ1200, and HEADOFFICE is the host name (the name of the 
computer to which the hp LaserJet 1200 is attached). 
Hence //HEADOFFICE/hpLJ1200/ 

ADVANCED is the workgroup name for the Windows local area network.  

I will have to look up the other parameters tomorrow Hong Kong time (it is now 
10:30 PM here, and my Linux books for this are all at the office).  I think 
the name of the file to print should be on the command line, and is missing.  
From my recollection, I am not sure the line you asked about has the correct 
parameters.  

I will get back to you in 10 hours or so.  Thanks.

Comment 3 Rick Graves 2003-09-10 14:44:20 UTC
Tim,

I take it back, the command I typed to the terminal window is this:

smbclient "\\\\headoffice\\hpLJ1200" -N -c "print tpr.txt"

(I looked up my August post in LinuxPrinting.org.)

You asked about:

smbclient //HEADOFFICE/hpLJ1200 -W ADVANCED -N -P -c quit

Where did this line come from?

So maybe I do not understand your question.

Thanks ... 

Comment 4 Tim Waugh 2003-09-10 14:47:33 UTC
I just need to see the output of it.  Thanks.

Comment 5 Rick Graves 2003-09-11 00:49:43 UTC
Tim,

Here is the output of that command:

added interface ip=192.168.0.7 bcast=192.168.0.255 nmask=255.255.255.0
Got a positive name query response from 192.168.0.3 ( 192.168.0.3 )
Domain=[ADVANCED] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Thanks,

Rick

Comment 6 Tim Waugh 2003-09-11 11:05:14 UTC
In /etc/cups/printers.conf, what does the DeviceURI line say?

Comment 7 Rick Graves 2003-09-11 11:18:06 UTC
Tim,

I found this:

#
# DeviceURI: the device URI for this printer.
#

#DeviceURI parallel:/dev/plp
#DeviceURI serial:/dev/ttyd1?baud=38400+size=8+parity=none+flow=soft
#DeviceURI scsi:/dev/scsi/sc1d6l0
#DeviceURI socket://hostname:port
#DeviceURI tftp://hostname/path
#DeviceURI ftp://hostname/path
#DeviceURI http://hostname[:port]/path
#DeviceURI ipp://hostname/path
#DeviceURI smb://hostname/printer


Helpful?

Thanks,

Rick

Comment 8 Tim Waugh 2003-09-11 11:24:31 UTC
Not really. :-)  I need to see the one that doesn't start with '#'.

Comment 9 Rick Graves 2003-09-11 12:55:39 UTC
Tim,

I will have to look again tomorrow (I am now at the flat). 

I assumed that all the lines with DeviceURI would be together, so I did not 
check after the block that I sent to you.  The lines that follow immediately 
after the block do not contain DeviceURI.  Because I assumed that all the 
lines with DeviceURI would be together, I assumed that there were no lines 
without the #, and that was the answer.  

Enough explanation -- I will look again tomorrow (Friday) morning (Thursday 
evening North Carolina time). 

Rick

Comment 10 Tim Waugh 2003-09-11 12:58:33 UTC
Okay.  I would also like to see the output of:

/usr/sbin/alternatives --display print

Comment 11 Rick Graves 2003-09-12 01:26:54 UTC
Good morning,

here is the line from printers.conf

DeviceURI smb://@ADVANCED/HEADOFFICE/hpLJ1200

here is the output of /usr/sbin/alternatives --display print

print - status is auto.
 link currently points to /usr/bin/lpr.cups
/usr/bin/lpr.cups - priority 40
 slave print-cancel: /usr/bin/cancel.cups
 slave print-lp: /usr/bin/lp.cups
 slave print-lpq: /usr/bin/lpq.cups
 slave print-lprm: /usr/bin/lprm.cups
 slave print-lpstat: /usr/bin/lpstat.cups
 slave print-lpc: /usr/sbin/lpc.cups
 slave print-cancelman: /usr/share/man/man1/cancel-cups.1.gz
 slave print-lpman: /usr/share/man/man1/lp-cups.1.gz
 slave print-lpqman: /usr/share/man/man1/lpq-cups.1.gz
 slave print-lprman: /usr/share/man/man1/lpr-cups.1.gz
 slave print-lprmman: /usr/share/man/man1/lprm-cups.1.gz
 slave print-lpstatman: /usr/share/man/man1/lpstat-cups.1.gz
 slave print-lpcman: /usr/share/man/man8/lpc-cups.8.gz
/usr/bin/lpr.LPRng - priority 30
 slave print-cancel: /usr/bin/cancel.LPRng
 slave print-lp: /usr/bin/lp.LPRng
 slave print-lpq: /usr/bin/lpq.LPRng
 slave print-lprm: /usr/bin/lprm.LPRng
 slave print-lpstat: /usr/bin/lpstat.LPRng
 slave print-lpc: /usr/sbin/lpc.LPRng
 slave print-cancelman: /usr/share/man/man1/cancel-LPRng.1.gz
 slave print-lpman: /usr/share/man/man1/lp-LPRng.1.gz
 slave print-lpqman: /usr/share/man/man1/lpq-LPRng.1.gz
 slave print-lprman: /usr/share/man/man1/lpr-LPRng.1.gz
 slave print-lprmman: /usr/share/man/man1/lprm-LPRng.1.gz
 slave print-lpstatman: /usr/share/man/man1/lpstat-LPRng.1.gz
 slave print-lpcman: /usr/share/man/man8/lpc-LPRng.8.gz
Current `best' version is /usr/bin/lpr.cups.

What next?

Thanks,

Rick

Comment 12 Tim Waugh 2003-09-12 10:40:48 UTC
Please fetch these packages:

ftp://people.redhat.com/twaugh/tmp/redhat-config-printer-0.6.47.10-1.i386.rpm
ftp://people.redhat.com/twaugh/tmp/redhat-config-printer-gui-0.6.47.10-1.i386.rpm

and install them using RPM:

rpm -Fvh redhat-config-printer-*0.6.47.10*

Does that fix the problem?

Comment 13 Rick Graves 2003-09-13 00:55:31 UTC
Tim,

I downloaded and installed the packages as you suggested -- they installed OK.

When I go into the printer configuration, I still only get the message:

Unable to connect to SAMBA host, will retry in 60 seconds...

:-(

What next?

Thanks,

Rick

Comment 14 Tim Waugh 2003-09-15 12:22:01 UTC
Okay, let's take another look at the DeviceURI line.  It should be different
this time.  You can get it using this (as root):

grep ^DeviceURI /etc/cups/printers.conf

Comment 15 Rick Graves 2003-09-16 01:06:28 UTC
Tim,

Thanks for the grep command.  It says this:

DeviceURI smb://@ADVANCED/HEADOFFICE/hpLJ1200

Watch out for Isabelle!  Its coming your way.

Rick

Comment 16 Tim Waugh 2003-09-16 08:39:35 UTC
Hmm, well that's the same, and still wrong.

What does '/usr/sbin/printconf-backend --force-rebuild' say, when you run it as
root?

Comment 17 Rick Graves 2003-09-16 08:52:24 UTC
Tim,

> What does '/usr/sbin/printconf-backend --force-rebuild' say, when you run it as 
root? 

It did not say anything.  The hard drive was active for several seconds, and
then it stopped.  There was no text output to the terminal window.

Thanks,

Rick

Comment 18 Tim Waugh 2003-09-16 08:54:44 UTC
Hmm.  Try:

grep ^DeviceURI /etc/cups/printers.conf

again?

Also, what does 'rpm -q redhat-config-printer' and 'rpm -V
redhat-config-printer' say?

Comment 19 Rick Graves 2003-09-17 00:29:45 UTC
Tim,

Here are the outputs of the three commands:

DeviceURI smb://ADVANCED/HEADOFFICE/hpLJ1200

redhat-config-printer-0.6.47.10-1

SM5....T c /etc/alchemist/namespace/printconf/local.adl

I hope this is helpful.

Rick

Comment 20 Tim Waugh 2003-09-17 08:56:10 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2003-276.html


Comment 21 Rick Graves 2003-09-19 02:36:30 UTC
Tim,

I filed a bug report against anaconda on the same computer, Bug 104686.

I hope everyone is hunkered down, and Isabel did not hit you and RedHat too hard.

Rick

Comment 22 Rick Graves 2003-09-19 02:37:30 UTC
Tim,

Is this closed?  

Rick

Comment 23 Tim Waugh 2003-09-19 08:18:27 UTC
Yes -- reopen if printing is still not working.  The Device URI is now correct
and so at least one bug has been fixed here.

Comment 24 Rick Graves 2003-09-20 01:47:10 UTC
Tim,

Sorry to be a pest, but I still cannot print from applications in the GUI
environment.  

My goal is to move the whole office over to RedHat Linux, but this is obviously
a stumbling block.  

If you can bear it, I would appreciate your help to continue troubleshooting
this issue.

Thanks,

Rick

Comment 25 Rick Graves 2003-09-21 04:15:02 UTC
Tim,

>>My goal is to move the whole office over to RedHat Linux, but this is 
obviously a stumbling block.  

It occured to me that my statement might not make sense.  

I have a step by step plan.  The person who "owns" the station where hp 
LaserJet 1200 is located will probably be the last to convert, or may never 
convert.  In the meantime, the Linux stations need to print to the hp printer.

The bottom line:  I would appreciate your help.

Thanks,

Rick

Comment 26 Tim Waugh 2003-09-29 07:22:19 UTC
Please set the LogLevel to Debug2 in the /etc/cups/cupsd.conf file, and restart
cups.  Then, note the time as reported by 'date' and submit another print job.

After a minute or so, take a copy of /var/log/cups/error_log and remove the
lines logged before the job was submitted.  Then attach it to this bug report,
and I'll take a look.

Thanks.

Comment 27 Rick Graves 2003-10-02 11:38:03 UTC
Created attachment 94875 [details]
CUPS error log file as requested

Tim,

The file is attached, I hope it is helpful.

Thanks,

Rick

Comment 28 Tim Waugh 2003-10-02 11:58:50 UTC
And what does this say?:

smbspool smb://ADVANCED/HEADOFFICE/hpLJ1200 1 user title 1 '' /etc/crontab

It should try to print /etc/crontab.

I'd also like to see what this command does:

smbclient //HEADOFFICE/hpLJ1200 -W ADVANCED -N -c quit

Comment 29 Rick Graves 2003-10-03 10:03:35 UTC
Tim,

[rick@magicpro rick]$ smbspool smb://ADVANCED/HEADOFFICE/hpLJ1200 1 user title 1
'' /etc/crontab
ERROR: SMB tree connect failed: NT_STATUS_ACCESS_DENIED
ERROR: Unable to connect to SAMBA host, will retry in 60 seconds...

[rick@magicpro rick]$ smbclient //HEADOFFICE/hpLJ1200 -W ADVANCED -N -c quit
added interface ip=192.168.0.7 bcast=192.168.0.255 nmask=255.255.255.0
Got a positive name query response from 192.168.0.3 ( 192.168.0.3 )
Domain=[ADVANCED] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
[rick@magicpro rick]$

Does this help?

Thanks,

Rick

Comment 30 Tim Waugh 2003-10-03 10:11:47 UTC
That *has* to be a samba bug.

Comment 31 Michael Kazanov 2003-10-03 20:06:13 UTC
Dear Tim and Rick,

I am experiencing the same problems. I installed RH 9 recently and installed all
updates. When I try to connect to WinXP shared printer (HP 2000D) it gives me
the same error message. I did one additional step -> I disabled "EASY FILE
SHARING" on WinXP as it was suggested on other IT Forum. However, it did not
help. So - there are no updates available and SMB printer sharing does not work
still. I am not very experienced in RH Linux - as a project I installed RH 9 to
make our people comfortable with it and I am planning in future to increase
Linux presence in our organization, but such problems cause difficulties for my
intend. I would be glad if we could clear this out. 
 
Michael


Comment 32 Tim Waugh 2003-10-03 20:48:08 UTC
Michael: are you sure this is the same problem?  Can you let us know the
DeviceURI from the /etc/cups/printers.conf file?  Use:

grep ^DeviceURI /etc/cups/printers.conf

Rick: can you try this please?:

smbspool smb://HEADOFFICE/hpLJ1200 1 user title 1 '' /etc/crontab



Comment 33 Michael Kazanov 2003-10-05 01:18:20 UTC
I made several experiments. I have Win2k Domain called STT, Sun Solaris Server
called assist workgroup STATISTICS, workstation zuo2 running WinXP, which has HP
printer attached locally. Also, we have several network printers and there are
shares for these printers on one of Win2k Domain Controllers and on Sun Solaris
machine as well.

I used "Printing" GUI

1) I tried to map network printer shared from Sun Solaris machine using
Networked Windows (SMB). When I clicked on ASSIST (SUN Machine in GUI I saw all
shared printers and I was able to map them. Here is URI:

DeviceURI smb://admin:mypassword@STATISTICS/ASSIST/a410-pr

It works fine.

2) I tried to map network printer shared from Win2k DC (called stt-dc-2) machine
using Networked Windows (SMB). I did not see it in GUI unless I entered info in
"Specify" menu. After that it appeared in GUI and I could select it.

DeviceURI smb://admin:mypassword@STT/stt-dc-2/a410-pr

Surprisingly enough, but it works fine today - no "Unable to connect to SAMBA
host, will retry in 60 seconds... " message any more - ??

AFTER that I tried to do the same procedure, but use not "admin" account, which
also presents on Sun Machine and has smbpasswd set up, but another account,
which is present only on Win2k Domain 

DeviceURI smb://adm:mypass@STT/stt-dc-2/a410-pr
DeviceURI smb://admin:mypassword@STT/stt-dc-2/a410-pr

It also worked.

Only when I used IP addresses instead of NetBios names, it failed with "Unable
to connect to SAMBA..." message.

Anyway, it is strange since I just repeated my previos steps and it works now,
but did not work before.. ??

3) I tried to map network printer shared from WinXP workstation (called zuo2)
machine using Networked Windows (SMB). I did not see it in GUI unless I entered
info in "Specify" menu. After that share \\zuo2\hpzuo appeared in GUI, but when
I tried to press "Forward" instead invitation to enter Authorization Info was
showed and it did not accept anything that I wrote. Now, instead of getting
"Unable to connect to SAMBA..." message, I cannot connect to that printer ??

Is that problem on Network with NetBios packets? Or something in RH ?

 


Comment 34 Michael Kazanov 2003-10-05 23:13:37 UTC
Today I tried to map printer connected to XP machine (3 case above).

It did not work with credentials of local administrator of XP machine (kept
asking to re-enter authentification credentials in GUI), however it worked with
my account information - this account is one on DC and included in local
administrators group of XP computer. Also the server in GUI (which performs
authentification) was specified to be local computer (not DC). 

DeviceURI smb://kazanov:mypass@STT/zuo2/hpzuo
DeviceURI smb://adm:mypass@STT/stt-dc-2/a410-pr
DeviceURI smb://admin:mypassword@STT/stt-dc-2/a410-pr


AFTER THAT I repeated the same procedure with my account again and I could not
succeed (kept asking to re-enter authentification credentials in GUI). 
I tried to map the same printer (attached to XP) machine with different accounts
using different authen. credentials, but it either asks me to re-enter this info
or shows at the bottom line printer "hpzuo (specified)" and when I click
"Forward" it asks me to re-enter authen. credentials...

I closed "Printing" GUI and opened it again. Then I repeated all above steps
again. The same picture - only after several tries it accepted authentification
credentials and printed test page fine.

DeviceURI smb://admin:mypassword@STT/zuo2/hpzuo
DeviceURI smb://kazanov:mypass@STT/zuo2/hpzuo
DeviceURI smb://adm:mypass@STT/stt-dc-2/a410-pr
DeviceURI smb://admin:mypassword@STT/stt-dc-2/a410-pr

-------------------------------------------------------------------------

So there is some inconsistency - the same authentification credentials sometimes
work sometimes not (they were always entered very accurately!!!). Does it look
like problem with "Printing" GUI ?


Comment 35 Rick Graves 2003-10-06 04:38:20 UTC
Tim,

[root@magicpro root]# grep ^DeviceURI /etc/cups/printers.conf
DeviceURI smb://ADVANCED/HEADOFFICE/hpLJ1200
[root@magicpro root]# smbspool smb://HEADOFFICE/hpLJ1200 1 user title 1 ''
/etc/crontab
ERROR: SMB tree connect failed: NT_STATUS_ACCESS_DENIED
ERROR: Unable to connect to SAMBA host, will retry in 60 seconds...

I was hoping to get some company from Michael, but maybe his problem fixed itself.

Thanks,

Rick

Comment 36 Gary Reeves 2003-10-06 18:37:56 UTC
I'm running RH 9 with all the latest patches on a home network sharing a cable
modem over a NetGear cable router. I can always print the CUPS Printer Test Page
on the first try to a Windows 2000 Pro station with a share on an HP OfficeJet
600.  Subsequent prints hang and Windows eventually generates an error about a
DOT 4 port.  If I reset the printer, it spits out the first 1/2 inch or so of
the hung second test page. I can then send another test page which prints OK,
but it once again hangs on subsequent print jobs.

Printing from kedit always hangs, even after a printer reset.  Test page thru
command center prints OK on first try, then hangs as before.

It's bugs like this that cause most I T Managers in legacy Windows environments
to consider Linux as "not quite ready for prime time."  sigh... Guess for now
I'll have to connect a printer direct or run sneakernet.  Any ideas would really
be appreciated.  I'm a Windows person in grad school and don't yet have much
experience with Linux.  Do prefer the g++ C++ compiler a light year beyond the
one in Microsoft Visual Studio, though!

Comment 37 Tim Waugh 2003-10-07 11:42:11 UTC
Gary: that is a different bug altogether.  Please file it as a new bug.  Thanks.

Comment 38 Tim Waugh 2003-10-07 11:46:05 UTC
Jay: this is looking like an smbspool bug to me.  Do you agree?  smbclient is
happy with the parameters from the (correct) URL given to smbspool, but smbspool
fails.

Comment 39 Adi Linden 2003-10-24 04:19:29 UTC
Hi Tim and Rick,

I have the identical problem. My wifes XP Home Edition box has an HP 6L attached
to it. I configured the printer using printtool and all it gives me is the
"Unable to connect to SAMBA host, will retry in 60 seconds..." error message no
print output at all. I also want to mention that I had been able to print to the
printer just fine with RedHat 8 and lpd (not cups). The problem didn't appear
until I installed RedHat 9 after a harddisk crash.

I suspect you'll be asking for this:

[root@mobile root]# grep ^DeviceURI /etc/cups/printers.conf
DeviceURI smb://MSHOME/JENN/hp

[root@mobile root]# smbspool smb://MSHOME/JENN/hp 1 user title 1 '' /etc/crontab 
ERROR: SMB tree connect failed: NT_STATUS_ACCESS_DENIED
ERROR: Unable to connect to SAMBA host, will retry in 60 seconds...

[root@mobile root]# smbclient //JENN/hp -W ADVANCED -N -c quit
added interface ip=192.168.2.105 bcast=192.168.2.255 nmask=255.255.255.0
Got a positive name query response from 192.168.2.104 ( 192.168.2.104 )
Domain=[MSHOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Anything else I can provide to help? I'd love to be able to print again, soon. I
am saving lot of trees lately, though :)

Thanks,
Adi

Comment 41 Rick Graves 2003-10-25 03:30:34 UTC
Hello Adi,

It seemed that I was the only person on the planet with this problem.

It also seems the experts are stumped on this.

As a work around, I have collected several "junk" Pentium I's.  I doing my first
Debian install at this very moment.  I am going to experiment with using a
headless Debian Pentium I as a CUPS print server.  There is a Debian HOWTO that
covers this.  

I also plan on using some of the Pentiums as "roll your own" firewall PC's.  I
am currently reading a book put out by RedHat Press, "RedHat Linux Internet
Server".  One of the early chapters is about setting up a firewall.  The book
admits that even a 486 has enough horsepower to be a firewall for a medium-sized
office.  Here is the irony:  a 486 has enough horsepower to be a firewall, but
not enough to install RedHat in the first place.  

Sorry I cannot give you any other solution.

Rick

Comment 42 Stew Schneider 2003-10-25 18:43:46 UTC
I've followed the discussion throughout, and have the same problem on the office
RH 9 box, with a bit of a twist. Here, the office box is connected thru a
LinkSys to my secretary's machine which is running XP Pro and has a Lexmark
Optra T616 attached. I cannot print to it, just as discussed, with the same errors. 

At home, the RH 9 box is connected through a LinkSys to an XP Home Edition box
which has a Lexmark 3200 connected. I can print to that without problem from the
RH box.

Comment 43 Adi Linden 2003-11-14 21:21:06 UTC
Yesterday I installed RedHat AS 3.0 on the notebook that has been
experiencing this printing problem. I cannot print with RedHat AS 3.0
with the exactly same symptoms as observered with RedHat 9.0. This is
becoming really frustrating!

Comment 44 Bill Keese 2003-11-19 06:49:35 UTC
Hello everyone.  smbspool doesn't seem to prompt for username or
password, so don't you have to specify that in the URI?  I was getting
the same authentication errors from smbspool as people above:

# smbspool smb://SPRO/ntfsrv1/FXAbleMo.2 1 user title 1 '' /etc/motd
failed tcon_X with NT_STATUS_ACCESS_DENIED

And then I inserted the username / password into the URI and it worked
fine:

# smbspool smb://bill:myPasswd@SPRO/ntfsrv1/FXAbleMo.2 1 user title 1
'' /etc/motd

As for printing from application (via CUPS), that part isn't working
for me because (apparently) /usr/lib/cups/backend/smb doesn't exist. 
Where do I get that file?


Comment 45 Bill Keese 2003-11-19 07:44:06 UTC
Nevermind, found the answer to my previous question:
http://de.samba.org/samba/docs/man/CUPS-printing.html#id2949505

You need to link /usr/lib/cups/backend/smb to smbspool.  Now I can at
least print text documents.  Postscript isn't working for some reason.

Comment 46 Tim Waugh 2003-11-19 10:12:45 UTC
No, that should be done automatically when you install samba-client. 
If not something else is wrong (and a *separate* bug report should be
filed about it).

Comment 47 Tim Waugh 2003-11-19 10:15:39 UTC
I really don't think this is to do with passwords in the URI.  See
this trace from comment #39, in which no password or username is
provided or requested for either method, yet only smbclient succeeds:

[root@mobile root]# smbspool smb://MSHOME/JENN/hp 1 user title 1 ''
/etc/crontab 
ERROR: SMB tree connect failed: NT_STATUS_ACCESS_DENIED
ERROR: Unable to connect to SAMBA host, will retry in 60 seconds...

[root@mobile root]# smbclient //JENN/hp -W ADVANCED -N -c quit
added interface ip=192.168.2.105 bcast=192.168.2.255 nmask=255.255.255.0
Got a positive name query response from 192.168.2.104 ( 192.168.2.104 )
Domain=[MSHOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Jay, can you please confirm that this is a samba bug?

Comment 48 mathew 2004-04-06 16:01:45 UTC
I have exactly the same problem: smbclient works, smbspool doesn't.

smbclient //server/printer connects and drops me to an smb prompt, and
I can use  print test.txt to print a test file.

smbspool //server/printer 1 user title 1 '' test.txt fails with:

failed tcon_X with NT_STATUS_ACCESS_DENIED
ERROR:  Connection failed with error NT_STATUS_ACCESS_DENIED
ERROR: Unable to connect to SAMBA host, will retry in 60 seconds...

smbclient -L server also works, and lists the printer spools. So it
seems to me that smbspool is fundamentally broken.

Is there any easy way to get cups to use smbclient instead of smbspool
for sending files, as a workaround?

Fedora Core 1, samba-common-3.0.2-7.FC1, samba-client-3.0.2-7.FC1.

Comment 49 mathew 2004-04-06 16:10:28 UTC
I've just tried installing the latest Samba RPMs from
http://us3.samba.org/samba/ftp/bin-pkgs/Fedora/RPMS/i386/core/1/ and
it's still broken in those. So, definitely looks like a Samba problem.

Comment 50 Nick Simicich 2004-04-20 06:17:28 UTC
I think I just submitted a duplicate of this bug against fedora 1 -
See 121290. I apologize, I searched for bugs within bugzilla and
thought I had searched exhaustively - when I googled the bugs showed
up. The workaround I found (which works reliably for me) is to specify
any old userid in the "URL".

That is, if you added the printer from CUPS, go into CUPS and change
the url that defines the printer to

smb://randomuser@[workgroup/]systemname/sharename

Or if you added the printer from redhat-config-printer go in there and
specify any old userid on the screen where you specify userid.

It does not matter what the userid is, it can be anything.  This
change seems to make smbspool do the right thing.  I was able to
reproduce this from the command line with smbspool, so I really
believe that it is an smbspool issue and not one of links or
alternatives or other stuff.

In other words:

smbspool smb://work/system/queue 1 2 3 4 5 file 

fails and 

smbspool smb://zithead99@work/system/queue 1 2 3 4 5 file 

works, even though there is no such user on any system at my location
on any system, nor has there ever been.  (At least it returns without
hanging. This printer does not do so well on raw text, and test pages
print with the dummy user and fail without them.


I did a number of web searches, and I believe that this is a common
problem, by he way.  I searched on the keywords print and
NT_STATUS_ACCESS_DENIED and saw a lot of people asking this, or
dialogs about it. 


Anyway, I hope this helps.  I am going to add myself to the CC list -
let me know if this workaround works for you.  It looks almost like it
is supposed to be there if you make the userid "guest" :-)

Comment 52 labilabi 2004-05-22 03:43:01 UTC
in printer configuration. change to lower case
//HEADOFFICE/hpLJ1200 to //headoffice/hpLJ1200

Comment 53 labilabi 2004-05-22 03:48:33 UTC
5. Troubleshooting
5.1. Failing To Connect To Windows Printers

When smbspool, the smbclient utility CUPS uses, fails to connect
properly it emits error messages that are humorous but not very
helpful. One such message is Unable to connect to SAMBA host: Success.
Another sign of connection failures is when documents seem to get
stuck on the queue when printing to Windows printers.

View the most recent entries in the CUPS log with the following command:

/usr/bin/tail /var/log/cups/error_log

If you see a message similar to cli_connect() failed... then smbspool
could not find the Windows PC you are trying to connect to. Check the
spelling of the Windows PC's host name. Check that the Windows PC is
turned on and that its network connection is functioning properly.
Make sure you can connect to it using smbclient as shown in Section 3.1.

If you see a message similar to SMB tree connect failed: ERRSRV -
ERRinvnetname then smbclient connected to the Windows PC but could not
connect to the printer you requested. Check the spelling of the shared
printer using smbclient as shown in Section 3.1.
5.2. Other Failures

Other failures include being unable to print to a local printer and
having your print jobs disappear from the queue without being printed.
You may also see vague error messages such as Child process 2384
exited with status 32.

Increase CUPS' logging level to "debug" to see more messages about
what happened before the print job failed.

   1.

      Open the main CUPS configuration file /etc/cups/cupsd.conf in a
text editor.
   2.

      Change the line that reads "LogLevel warn" to "LogLevel debug".
   3.

      Save the configuration file and exit the text editor.
   4.

      Restart the CUPS server with the command:

/etc/init.d/cupsys restart

You can follow the CUPS log with the following command:

/usr/bin/tail -f /var/log/cups/error_log

You should see a line that reads Scheduler shutting down due to
SIGTERM. This indicates that the CUPS server was stopped successfully.

Send your print job again and watch for useful debug messages that
appear. One example of a useful debug message is GNU Ghostscript 7.05:
Can't start ijs server 'hpijs'. In this case the solution is to
install the "hpijs" package.

If you cannot determine the cause of the failure, do an Internet
search for key terms in error messages you see; it is likely that
someone has solved your problem before. You may also try upgrading the
packages listed in Section 2.2 to their latest versions. 

Comment 54 Rick Graves 2004-05-24 05:50:24 UTC
Hello labilabi,

When I discovered this problem, I had RedHat 9 installed at the
workstation.  I have since installed Fedora, and I have not bothered
to try to print to the hp LaserJet connected to the Windows PC.  

I have a spare hard drive.  I could reinstall RedHat 9 on the spare
drive, or I could try to connect from Fedora.  Oviously, connecting
from Fedora would be easier.  

I do not mind putting some effort into trying to solve this.

Please let me know.

Thanks,

Rick

Comment 55 Nick Simicich 2004-05-25 18:38:30 UTC
I'd be interested in knowing if the workaround I suggested in comment
50 (adding a random userid to the configuration) fixes your problem as
it fixed mine which had the exact same symptoms.

You can test it from the command line using the smbspool commands I
gave - if they work the way I indicated that they work for me then
changing your cups config to add a random userid will probably work.

And you can likely test that from Fedora.

Comment 56 mathew 2004-05-26 01:36:30 UTC
Fixed it for me (mathew).

Comment 57 Rick Graves 2004-06-01 02:02:30 UTC
Hey,

"Zithead" works for me!  Thanks!!!!  Great job!!!

So if you ask me, this bug can be resolved as workaround-able.  But 
that is not an option in the pull down.  I guess "works for me" is 
close enough. 

This solution will help me take more steps away from that other 
operating system.  

Thanks,

Rick

Comment 58 Alan Heartfield 2004-07-30 04:58:58 UTC
I am experiencing the same problem with "unable to connect...6o 
seconds".  Linux is Redhat 9, the printer is an Epson 880, BUT I have 
3 XP boxes.  Two of them work just fine, the 880 installs in less 
than a minute and test pages all print.  The CUPS GUI doesn't even 
ask for a username or password.  The third won't work at all.  CUPS 
GUI asks for a username and password, but will accept none.  If I 
work-around this problem, then the error message.  So it HAS to be 
something in the XP box configuration.  Chasing Samba is a waste of 
time.  

Alan 

Comment 64 Stew Schneider 2004-12-18 20:33:42 UTC
I'm now printing successfully to a Lexmark Optra T616 connected to an
XP Pro machine from my FC2 desktop after I installed Samba
3.0.9-1.fc3. I added the Lexmark from the CUPS administration tool at
localhost:631. I included a random user@<workgroup> in the URL. Seems
to work fine, so far. My earlier RH9 system could not access this printer.

stew

Comment 65 Stew Schneider 2004-12-18 20:42:46 UTC
Oops! My FC3 desktop, rather.

stew


Comment 66 Stew Schneider 2004-12-18 20:43:56 UTC
Oops! My FC3 desktop, rather.

stew

Comment 67 Roland Hammerle 2005-01-04 18:03:51 UTC
This is a very interesting bug report. I have been pulling out my hair
today just to get printing with Samba/CUPS working. I do this on
ArchLinux but the problem of the original poster is exactly the same.

1) Experimenting with smbtool

I replaced smbtool with a small shell script that prints out some
information (environment, arguments, etc) and then runs smbtool. Even
though using the original smbtool never worked, running it from within
the shell script works! The DEVICE_URI is properly set as an
environment variable - at least from what I see in my shell script.
Once I switch back to the original smbtool, printing does not work.

2) Experimenting with DEVICE_URI

Guest account is not enabled. Roland is my user account on XP.

smb://WORKGROUP/192.168.0.3/HPLaserJet1015 -> nope
smb://Guest@WORKGROUP/192.168.0.3/HPLaserJet1015 -> nope
smb://Roland@WORKGROUP/192.168.0.3/HPLaserJet1015 -> nope
smb://Roland:password@WORKGROUP/192.168.0.3/HPLaserJet1015 -> nope

and finally

smb://Roland@password@WORKGROUP/192.168.0.3/HPLaserJet1015 -> YES!

It would be interesting if that solves problems for other people as
well. But note 1) above. There I used DEVICE_URI =
smb://Guest@WORKGROUP/192.168.0.3/HPLaserJet1015.

Comment 69 Jay Fenlason 2005-03-01 16:46:20 UTC
This was fixed in samba-3.0.9-1.3E.1.  The lastest up2date samba is 
3.0.9-1.3E.2 

Comment 70 John Thacker 2006-10-28 17:09:25 UTC
*** Bug 121290 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.