Can't print to printer attached to Win98 from linux

Christian Barth barth at cck.uni-kl.de
Mon Apr 30 18:33:00 GMT 2001


> I have more info here.... I've got my /etc/samba/smb.conf file from home and my
> /etc/printcap files here....
> First of all, a recap:
> I set up SAMBA using WebMin on RedHat 7.1 last night. The Windows 98 SE box and
> the RedHat 7.1 box are side by side on the same physical desk and on the same
> physical and numerical network. I can share files between the two (both
> directions, apparently) but can't seem to print, even though I've gone into the
> WebMin and configured it as a printer shared on a SAMBA network. 
> The printer is a Canon BJC-1000 and is shared as "CANON" and is on the Win98 SE
> box. I suspect there is a problem with the config on the linux side as I never
> even see the ATTEMPT to print on the Windows machine.
> 
> I had to enable encrypted passwords to even share drives, etc. I checked and
> didn't see any errors in the log files... it's like the print attempts never
> happened. :-(

I have just greped though my arcive. May the mail below helps you as 
well. Basically you have to start with debugging if it is a problem 
of samba or of your print system.

Coution: Check if all path / commands /syntax in the mail aplies to 
you. The smbclient command can know be used with / too

Christian

 

------- Forwarded message follows -------
From:           	"Christian Barth" <barth at cck.uni-kl.de>
To:             	samba-ntdom at us5.samba.org, Peter Leif Rasmussen 
<plr at tt.dk>
Subject:        	Re: A newbie question
Priority:       	normal
Date sent:      	Wed, 6 Dec 2000 18:39:54 +0100

[ Double-click this line for list subscription options ] 

OK,
create a print-file sutiable for this printer. Is it a postscript 
printer, then any postscript file will be ok. I will call the file: 
test.ps.

Then, go into a Unix-Shell, type sh to enter the korn-shell,
then type a comand line like:

(echo "print -"; cat test.ps) | /usr/local/bin/smbclient 
\\\\NTMAIN\\prtb2s1 your_password -E -I 89.1.1.23 -N -P -U plr -W 
THRANE

One line!! The \ are repeated because they are special characters to 
the shell. Watch the error messages, read man smbclient. If the above 
works, the problem is not with samba and NT but with Mandrake. In the 
first case tell me the errors, in the later case forget the gui-
configuration, do it manually. Some where in the samba-docs should be 
a discription. Look in what is installed on your system. 
/etc/printcap. There should be some thing like:
smb:\
  lp=/dev/null:\
  sd=/usr/spool/smb:\
  sh:\
  if=/usr/bin/smbprint
with smb as Unix Printer name. Do a "locate smbprint" to see if you 
have a smbprint skript on your system. This skript has a config file, 
propably .config in the spool directory, and creates the above 
comand. But it may be packed into the Mandrake print-filters, ...

By the way,
it's good idea to create a "print-only" user on the NT-Server. The 
password of this user is stored as plain text in the config file, 
which is world readable!! (must be?) So, don't use your account.

Probably only nmbd and not smbd must run for the smbclient comand to 
work. I'm not sure about this. Don't have unnessecary deamons running.

Christian



> I am terribly sorry to ask this supposedly FAQ, but I am enough in
> distress that I don't know where else to ask. If this place turns 
out to
> the wrong place to ask please tell me where to. I did go through a
> number of emails in the archives, but couldn't pin point one that
> discussed my exact problem.
> 
> Basically I want to print out from a Linux machine recently 
installed
> with Mandrake 7.2 to an HP4000 printer that sits on an NT4 server. 
With
> all the configuration tools in Mandrake 7.2 I hoped that the Samba
> configuration would be a breeze. I do however not know anything 
about
> neither NT4 and its way of printing, nor do I really understand 
what I
> must look for and do in the Samba configuration.
> 
> Using "smbclient -L 89.1.1.23" I got the following, which I believe 
is
> the right info (I filtered out everything else):
> 
> Sharename      Type      Comment
> ---------      ----      -------
> prtb2s1        Printer   HP printer
> 
> Server               Comment
> ---------            -------
> NTMAIN               Main NT  SERVER (PDC)
> 
> Workgroup            Master
> ---------            -------
> THRANE               NTMAIN
> 
> So while using 'printerdrake' to configure a printer with Samba (and
> CUPS) I say that:
> 
> Name of printer:  lp
> SMB Server Host:  NTMAIN
> SMB Server IP:    89.1.1.23
> Share Name:       prtb2s1
> User Name:        plr
> Password:         ******       (I use my Windows network password)
> Workgroup:        THRANE
> 
> I select HP Laserjet 4000 from the CUPS menu, which corresponds 
with the
> actual printer, but when I then select to print out a test page I 
always
> get:
> 
> lpr: unable to print file: Not Accepting Jobs
> 
> And in a new window the following is displayed:
> 
>    Test page(s) have been sent to the printer daemon.
>    This may take a little time before printer start.
>    Printing status:
>    lp is not ready
> 
> 
>    Does it work properly?
> 
> I have tried fiddling with all the values in many ways, but as I 
don't
> really understand what is necessary and what is going on I have now
> given up. I have asked our sysadmins, who are solely NT capable and 
they
> have verified that the information regarding how the printers are
> connected to the NT server is correct. They are otherwise not able 
to
> help me, and I don't know what good questions to ask them.
> 
> Could someone here please enlighten me?
> 
> Thank you very much,
> 
> Peter
> 
> 
> 
> 

_______________________________________________________________________
In a world without walls and fences, who needs windows and gates? (SUN)




More information about the samba mailing list