LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-07-2005, 11:57 PM   #1
DaveAtFGI
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
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

 
Old 07-08-2005, 01:14 AM   #2
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
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.
 
Old 07-08-2005, 11:00 PM   #3
DaveAtFGI
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Original Poster
Rep: Reputation: 0
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
 
Old 07-09-2005, 02:04 AM   #4
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
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.
 
Old 10-27-2005, 03:47 PM   #5
kermitthefrog91
LQ Newbie
 
Registered: Apr 2005
Location: Brussels, Belgium
Distribution: Gentoo
Posts: 17

Rep: Reputation: 0
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
 
Old 10-29-2005, 08:25 AM   #6
Sloppyunderfoot
Member
 
Registered: Nov 2004
Location: Maine, USA, North America, Western Hemisphere, Earth, Milky Way Galaxy
Distribution: SUSE10
Posts: 61

Rep: Reputation: 15
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
 
Old 10-29-2005, 05:07 PM   #7
kermitthefrog91
LQ Newbie
 
Registered: Apr 2005
Location: Brussels, Belgium
Distribution: Gentoo
Posts: 17

Rep: Reputation: 0
not being green.....

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to a windows shared printer rbm Linux - Networking 22 12-30-2005 11:30 AM
Printing to a Windows Shared printer rwillard Linux - Newbie 8 03-17-2005 11:05 AM
Network Printer Shared in Windows crewblunts Linux - Hardware 1 02-12-2004 10:55 PM
Networking with Windows XP and printing to Windows XP shared printer AlanButler Red Hat 1 10-27-2003 07:07 AM
Asimple way to connect Windows XP Shared printer to Linux ikw38 Linux - Networking 3 06-21-2003 11:12 PM


All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration