Diembo
2002-May-01 01:21 UTC
[Samba] smbclient & printing on win2k box with HP Deskjet 560C (Drivers?) SMB 2.2.3a - Kernel 2.4.7, red hat 7.2
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. 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
Deryk Robosson
2002-May-01 01:38 UTC
[Samba] smbclient & printing on win2k box with HP Deskjet 560C (Drivers?) SMB 2.2.3a - Kernel 2.4.7, red hat 7.2
On Wed, 1 May 2002, Diembo wrote:> 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.Shame shame ;)> 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.Try using CUPS. CUPS works a treat with smb and also works fine with my HP deskjet printer. [SNIP] -- Regards, Deryk Robosson Robosson Business Services 22 Flemington Street Albany, WA 6330 ABN: 56 728 377 499 Phone: +61 4 0842 9835 Email: deryk@0x0a.com
Joel Hammer
2002-May-01 05:15 UTC
[Samba] smbclient & printing on win2k box with HP Deskjet 560C (Drivers?) SMB 2.2.3a - Kernel 2.4.7, red hat 7.2
You don't need samba to print, just smbclient. That is, you don't need to be running a samba server. Since you don't have much time and don't want to mess around with a lot of stuff, here is the quick and dirty way. Assuming your printer is postscript, just print your document in postscript format to a file. Then, smbclient -L Win2kServer and see what the name of the printer share is. Then: smbclient //Win2kServer/PrinterShare Do the password stuff print YourFile quit You can make this one command with: cat YourFile | smbclient //Win2kServer/PrinterShare PasswordStuff -c " print -" If you leave out the PasswordStuff you will be prompted for it. If you have to filter your job for your printer (ie. It doesn't know postscript), then things get slightly more complicated. You will have to find a gs device for your printer. Man gs. Joel On Wed, May 01, 2002 at 08:22:15PM +1200, Diembo wrote:> 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. 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 O Linux :-P > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Christian Barth
2002-May-01 08:11 UTC
[Samba] smbclient & printing on win2k box with HP Deskjet 560C (Drivers?) SMB 2.2.3a - Kernel 2.4.7, red hat 7.2
> 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.) BTW: 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. Christian> 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|// \\|/// \\\|//\\\|/// \|/// \\\|// \\|// \\\|// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^