LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using windows shared printer from linux (https://www.linuxquestions.org/questions/linux-newbie-8/using-windows-shared-printer-from-linux-341139/)

DaveAtFGI 07-07-2005 10:57 PM

Using windows shared printer from linux
 
Let me preface this message by saying that I have read similar articles posted here and they have not worked for my situation.

Here is the situation...I have a Brother HL-5040 Laser jet hooked up to a windows XP machine, the printer is shared along with several other directories. I am able to access the shared directories using smbclient on the Linux machine. I have configured the printer via localhost:631 and told the linux machine to accept the printer. I have tried to print a test page in both KDE and at the shell prompt which prints the following,"request id is Brother_Laser-7 (1 file(s))" however no page EVER prints.

I can get some action out of the printer when I connect to it via smbclient and tell it to print a file (it warms up, then sits, but that is more than what I get through lp)





Below is a copy of my etc/cups/printers.conf file


# Printer configuration file for CUPS v1.1.23
# Written by cupsd on Thu 07 Jul 2005 05:19:08 PM CDT
<Printer Brother_Laser>
Info Brother Brother HL-5040 hl1250
Location
DeviceURI smb://BASEMENT/Janeslaptop/Laser
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
<DefaultPrinter BrotherLaser>
Info BrotherLaser
DeviceURI smb://Janeslaptop/Laser
State Stopped
StateMessage
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0



also, here is a copy of a message I get while running the CUPS config on localhost,

Default Destination: BrotherLaser

Brother_Laser Brother HL-5040 Foomatic/hl1250 (recommended)
Description: Brother Brother HL-5040 hl1250
Location:
Printer State: processing, accepting jobs.
"Unable to connect to SAMBA host, will retry in 60 seconds...ERROR:
Connection failed with error NT_STATUS_ACCESS_DENIED"
Device URI: smb://BASEMENT/Janeslaptop/Laser




any help would be greatly appreciated.

Thanks,
Dave

:Pengy:

DaHammer 07-08-2005 12:14 AM

You'll need to specify the username and password for the user on XP that has access to the printer share, else setup the Guest account and use that. In other words you need to edit the "DeviceURI" directive in your printers.conf file to something like this:
Code:

DeviceURI smb://username:password@WORKGROUP/pathto/printer
I believe for guest access, you do it like so:
Code:

DeviceURI smb://guest@WORKGROUP/pathto/printer
Anyway, I'd start by making sure the share is actually working and avoid going through cups until you know it is. You can do that using the "smbclient" command from a command line.

This will list the shares:
Code:

smbclient -U username -L computernameorip
Once you know the name of the share then move on to a test print:

Code:

echo "1234567" > testing.txt
smbclient -U username //PCNAMEORIP/PRINTERNAME -c 'print testing.txt'

See "man smbclient" for more info on it. Once that works, then it's just a matter of getting cups setup correctly to use the share. Just keep in mind that if you use a user account to connect to the printer then that user's password is stored in the printers.conf file. There may be a way around that, I don't recall, but you can always use XP's guest account if you want. Good luck.

DaveAtFGI 07-08-2005 10:00 PM

Thank you for the idea, however I don't think this is the problem. I have no problem accessing the shares (I can copy files from the same machine w/out having to send a Uname or Pword. I did try this just to make sure and I end up at the same place. The printer will come on and prepare to print but then it just sits there and I have to hit my job cancel button to get anything to come out of it. Thanks anyway.

Dave

DaHammer 07-09-2005 01:04 AM

Re: Using windows shared printer from linux
 
Quote:

Originally posted by DaveAtFGI

Connection failed with error NT_STATUS_ACCESS_DENIED"
Device URI: smb://BASEMENT/Janeslaptop/Laser

Well as you can see from the above error, Windows is not allowing access to the printer via cups. Which means that cups isn't properly authenticating through smb. You probably get farther when using smbclient directly because cups isn't involved then. You might look through the security policies in Window's control panel as well as the security tab on the printer's properties. You might also try enabling/disabling spooling on the printer.

kermitthefrog91 10-27-2005 02:47 PM

i had the same problem as you.

It's an easy fix...

in your /etc/cups/printers.conf file

you need to change
Code:

DeviceURI smb://Mom/hpdeskjet
to
Code:

DeviceURI smb://guest@Mom/hpdeskjet
the guest@ is what makes all the difference

Sloppyunderfoot 10-29-2005 07:25 AM

kermitthefrog91- I have been struggling with not being able to print to a networked printer for a very, very long time. This fix did it for me. Thank you , thank you, thank you.I found that my modifying the printer.conf file and then making the similar change to CUPS my print test worked and then I could print from other applications Looks like being green has its advantages ;)

kermitthefrog91 10-29-2005 04:07 PM

not being green.....

its just using Gentoo over Mandriva ;) ... sharper learning curve pays off...


All times are GMT -5. The time now is 12:37 AM.