[Samba] smbclient & printing on win2k box with HP Deskjet 560C (Drivers?) SMB 2.2.3a - Kernel 2.4.7, red hat 7.2

Christian Barth barth at cck.uni-kl.de
Wed May 1 08:11:02 GMT 2002

> Hi LUs,
> I dont have much time at the moment to read tons of documentation. So, I 
> would like to ask a hopefully easy to answer question.
> Samba is running alright with me, smbclient works fine, but I would like to 
> print from my Linux box over LAN to a printer (HP 560C) connected to a win2k 
> box. Because I can't afford a better or second printer & I also havent got 
> enough room for it really I would like to print my Linux-stuff over LAN.
> Anyway, how do I do that? I read a bit about smbclient and a printer script 
> and that you need special drivers but I couldn't work it out so far.
In most modern Linux distributions the GUI to setup printers should 
do all the dirty work for you. Do it and watch for errors. Asumming 
you have a /etc/printcap (= not using cups) you will find a if=... 
line for the printer you created. This is the input filter witch 
takes the printer data, convertes in data for the HP560C and uses 
smbclient to send it to w2k. Look at the script, it may call other 
scripts and find the smbclient command. Look at it's syntax and try 
it by hand. You will need to "print to file" on your w2k box and use 
this file with smbclient for testing. 

Come back to the list with the error massages of the smbclient 
command. Most likely there will not be the right permissions on the 
w2k box for printing. You may need to set up a "print only user" 
there with a special password. You have to use the spooler in w2k 
(which is normal but took me same houres to find it out once it 
didn't work.)

the syntax of the smbclient command is some thing like:

(echo "print - "; cat printfile) | smbclient //w2k-box/printer 
password -N -P -U user -W workgroup 

compare with man smbclient.


> If 
> anyone could give me an efficient solution for this I would be very greatful, 
> because I am sick of booting windows every time I want to do an assignment 
> and need to use a word processor. I would also like to use one of the 
> KDE-word processors because the amount of choice is so much bigger.
> Thanks in advance,
> regards
> Tim
> PS: Is there anybody in this mailing list, by accident situated in Palmerston 
> North (New Zealand) and knows about a local LUG?
> -- 
> Diembo working @ Linux :-P
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba

               _(_)_                          wWWWw   _
   @@@@       (_)@(_)   vVVVv     _     @@@@  (___) _(_)_
  @@()@@ wWWWw  (_)\    (___)   _(_)_  @@()@@   Y  (_)@(_)
   @@@@  (___)     `|/    Y    (_)@(_)  @@@@   \|/   (_)\
    /      Y       \|    \|/    /(_)    \|      |/      |
 \ |     \ |/       | / \ | /  \|/       |/    \|      \|/
jgs|//   \\|///  \\\|//\\\|/// \|///  \\\|//  \\|//  \\\|// 

More information about the samba mailing list