Jump to content

Windows printer sharing - SOLVED


Latem
 Share

Recommended Posts

I have never tried Windows + Linux networking, so I am seeking some advice.

 

I'll explain my situation.

 

I have a Windows XP Pro machine, a Mandrake 10.0 Official machine, sharing a cable connection w/ a D-Link Router. Also I have a Epson Stylus COLOR 600 Printer connected to my Windows Box. I had the printer connected to my linux box before, and have it correctly configured, and am able to print to it perfectly when it is connected to my linux box.

 

My main priority is that I would like to be able to print from my Linux box to this printer, when the printer is connected to the XP box. It is a real pain that I have to disconnect the printer from XP box and connect it to the Linux box, just to print a document. Just simple printer sharing right?

If I could get file sharing to work that would be nice too.

 

I've enabled File and Printer sharing, and also explicitly enabled sharing of this printer in the windows. The printer is shared as Epson600. Lets say my XP computer name is XPBox. and workgroup is WORKGROUP.

 

If I do ipconfig on my windows box it gives me an ip address.

 

If I do ping <that ip address> from my linux box, it cant see it at all.

 

However, if I go to like an iplocator website, it gives me another ip address.

 

if I do ping <that other ip address> it pings it fine.

 

I am guessing that ip address is the address of my router, because if I go the same iplocator site w/ my linux box, it gives the same address.

 

otherwise, I cant get them talking at all.

 

I've searched google, and everywhere I find it talks about editing etc/printcap but that file (for me) is the result of etc/cups/printers.conf, which by the looks of it is the result of the cups web admin.

 

I am completely lost. I've asked some1 else, and he thought I need to first add my linux box to the windows workgroup.

In my case the workgroup is WORKGROUP.

 

I've tried adding the printer using both addresses with KDE Print but it always keeps asking for a password upon "test" and I dont know what to put in there. I always specify use guest at the beginning of the wizard. And no matter what I try it always fails that authentication, and then says "failed to create temporary printer"

 

I dont know anything about smb, and I am completely lost. Please help.

 

Thanks a lot,

 

Latem

Link to comment
Share on other sites

I didn't read past the first couple of paragraphs, so sorry if they were important. My suggestion would be to use Samba to share the printer from linux, and never move it again. I have been sharing a HP LJ 6L for some time with this method. I'm honestly not sure what exists to print from linux by a doze shared printer.

Link to comment
Share on other sites

  • 2 weeks later...

ok The problem was the firewall.

 

Even though its Windows XP SP1, I had my Local Area Connection Firewalled with the generic windows firewall.

I didnt think that could be the problem, cuz I dont have much confidence in windows firewall anyway.

 

After disabling the firewall, I am able to see the computer in Smb4K.

 

It lists WORKGROUP, when I expand that I get the computer name, and when I expand that I get the printer share name.

 

So I tried adding that printer using KDEPrint, but in the wizard on the step where it asks for the printer, if I do scan it shows two "WORKGROUP", and then I can expand them it lists the computer name, but if I try and epanding that it doesnt list anything. so anyway I insert the workgroup, what it says for the computer for the server, and the printer share name for the printer. However it still fails on test. It asks for authentication (even though I had Guest checked), and whatever I type in it fails to authenticate.

 

I also did "Mount" for the printer in Smb4K, and tried the above again, and got the same results. Now I cant unmount the printer. It gives me:

could not open /home/<myname>/smb4k/<the windows comp name>/Epson600: Input/Output error

 

Retarting the computer unmounted it ofcourse.

 

Maybe I am almost there what do I do now?

 

Latem

Link to comment
Share on other sites

I've gone through all sorts of machinations in getting printing shared with Windows (xp and 2000) and Linux.

 

What is not clear from your posts is how you have Samba set up. You should be able to do a simple test to see if Samba is seeing your printer and how. As root run smbclient -L <windows share name>. If you see your printer listed you know that Samba is seeing it and the problems probably lies in your Cups configuration.

 

My problems have been in the realm of windows vs linux as the master. Windows wants to be. For whatever reason when setting up my printer I have reset my router then booted up windows and then linux!

Link to comment
Share on other sites

So this is what I did:

smbclient -L BOJAN-EF77GZTJ0

returns

Password:<i type root password here>
Domain=[BOJAN-EF77GZTJ0] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

       Sharename      Type      Comment
       ---------      ----      -------
       IPC$           IPC       Remote IPC
       print$         Disk      Printer Drivers
       Epson600       Printer   Epson Stylus COLOR 600 ESC/P 2
       ADMIN$         Disk      Remote Admin
       C$             Disk      Default share
Domain=[BOJAN-EF77GZTJ0] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

       Server               Comment
       ---------            -------

       Workgroup            Master
       ---------            -------

then

echo "test" |smbclient //BOJAN-EF77GZTJ0/Epson600 -P -U Bojan -c 'print -'

returns:

Failed to open /secrets.tdb
ERROR: Unable to open secrets database

finally,

"test" |smbclient //BOJAN-EF77GZTJ0/Epson600 -U Bojan -c 'print -'

gets me:

Password:<root password again>
Domain=[BOJAN-EF77GZTJ0] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
putting file - as stdin-2606 (0.0 kb/s) (average 0.0 kb/s)

 

But it didnt do anything. it didnt print or put a job or anything.

So I am not sure exactly what's up.

 

Any suggestions?

Link to comment
Share on other sites

Ahh! the joys of having a print server.

(Hopefully not sounding like a gloat!)

But I was very specific in what I wanted from my router when I got it 2 years ago.

Its almost like having a printer for each computer, so easy to set up (after you realise what they're talking about).

I remember it was easier to set up in Mandrake than XP. Something about LPD(line printer daemon) and pointed at your printserver's ip address, and PRINT!!

 

If your finances allow, get one!

D-Link print server link here ! wireless would be handy!

 

sorry I couldn't help more directly, but advice is sometimes more valuable.

I assume you know that printservers come in handy little devices that attach to the printer, then to an eth port on your router and 'away you go'

 

i have a Netgear FR114P firewall/router/printserver. Handy device!

 

cheers.

Edited by arthurking
Link to comment
Share on other sites

Since Samba sees your Windows shares the problem is likely on the Cups end. You did mention having the printer configured for Linux. When you put the printer on the Windows box did you delete the printer from your Linux box? I'm wondering if the Linux name is the same as the Windows name and Linux is trying to print to a printer that is not there. Check your /etc/cups/printers.conf file to check.

 

When you used KDE to set up the printer did it find it when you scanned your network?

 

Also try it with a user account rather than guest. Good luck.

Link to comment
Share on other sites

I didn't delete the old printer, because I dont really see the harm of it staying installed.

 

my /etc/cups/printers.conf:

 

# Printer configuration file for CUPS v1.1.20

# Written by cupsd on Fri Sep 24 20:01:51 2004

<DefaultPrinter EPSONStylusCOLOR600>

Info EPSON Stylus COLOR 600

Location

DeviceURI parallel:/dev/lp0

State Idle

Accepting Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

</Printer>

 

When you used KDE to set up the printer did it find it when you scanned your network?

Smb4k sees it. However, KDEPrint doesn't. In the add printer wizard when I try to add a smb (windows) printer there is a scan button, and it gets the workgroup, but if I try to expand it, nothing expands.

 

Latem

Link to comment
Share on other sites

Have you tried shutting down both systems and resetting your router? Then boot up Windows and then Linux. Also make sure when you add the linux printer that you give it a different name. Also did you try installing the printer from localhost:631 (Cups admin)?

 

Right now your printers.conf file only lists your Linux printer so you will not be able to print to the Windows printer from Linux. KDE uses the Cups configuration utility while smb4k sees your Samba shares. I have always found something problematic in getting the Cups configuration set up with Samba. Good luck again.

Link to comment
Share on other sites

I tried adding the printer using the CUPS WWW Tool.

 

For Name I put: Epson600

For location I put:

smb://WORKGROUP/BOJAN-EF77GZTJ0/Epson600

For Descriprion I put: Windows Printer

 

I followed the wizard, selected that its was a SAMBA printer, and for Device URI again put:

smb://WORKGROUP/BOJAN-EF77GZTJ0/Epson600

 

Selected the make and model, and it added the printer. However when I tried printing to it, it didnt print. In the KDEPrint (the little printer menager icon thing in the taskbar) it just said processing... for the job, and I had to delete it.

 

Did I do something wrong?

 

this is what it says in the CUPS manual:

Printing to Windows Servers

 

CUPS can print to Windows servers in one of two ways. The first way uses the LPD protocol on the CUPS system and the "TCP/IP Printing Services" on the Windows system. You can find out more about this configuration in the LPD section earlier in this chapter.

 

The second way is through the Microsoft Server Message Block ("SMB") protocol. Support for this protocol is provided with the free SAMBA software package. You can download SAMBA from:

 

http://www.samba.org

 

To configure CUPS for SAMBA, run the following command:

 

ln -s `which smbspool` /usr/lib/cups/backend/smb ENTER

 

The smbspool(1) program is provided with SAMBA starting with SAMBA 2.0.6. Once you have made the link you can configure your printers with one of the following device URIs:

 

smb://workgroup/server/sharename

smb://server/sharename

smb://user:pass@workgroup/server/sharename

smb://user:pass@server/sharename

 

The workgroup name need only be specified if your system is using a different workgroup. The user:pass strings are required when printing to Windows NT servers or to shares with passwords enabled under Windows 95 and 98.

I am not sure about this:

ln -s `which smbspool` /usr/lib/cups/backend/smb ENTER

I didnt do it, but

/usr/lib/cups/backend/smb

returns:

rwxrwxrwx  1 root root 26 Jul  7 16:39 /usr/lib/cups/backend/smb -> /etc/alternatives/cups_smb*

so is that ok? or should have I actually made the above link as it suggested.

 

Should have I used something like:

 

smb://mywindowsuser:thatpassword@BOJAN-EF77GZTJ0/Epson600

 

On another topic, I tried mounting a shared folder on my windows box with Smb4k. Smb4k detected it fine, and I was able to mount it, and browse the folder, and open files in it. However when I tried to copy a file to the folder I got access denied error. How can I fix this? I tried that "Authenticate" thing in Smb4k with my windows username and passowrd, but it didnt work.

 

Thanks for everything,

 

Latem

Link to comment
Share on other sites

Solved.

 

I did it using printerdrake.

For some reason when scanning, Printdrake could not detect the printer, same as KDEPrint. But I did it manually, and filled out the info (Server, Printer share name, workgroup, username, and password; and afterwords, the model and driver), and got it set up. For some reason I found this util a lot better, and easier to understand what I am supposed to be typing in, than KDEPrint. I know, i know, I am a n00b.

 

Also to be able to write to windows shares, I think you have to check the "Allow network users to change my files" checkbox in teh sharing tab of the folder properties (in windows). Otherwise, I couln't get access to write.

 

thanks for all the help guys.

 

Latem

Edited by Latem
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...