LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 09-03-2004, 04:36 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Question Printing to a network printer


I'd like to print to a printer shared by a Windows box on my network. Right now I'm having problems even connecting to shares with smbclient due to firewall issues on his end, but if I'm able to resolve that, what do I need to do to print to that? I'm not very familiar with printing under Linux in the first place, and all the tutorials online don't seem to address the network printer issue. Even excluding graphical programs, how would I print a file from the command line? Thanks.
 
Old 09-03-2004, 05:46 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
if you can get the firewall figured out this should help

http://www.faqs.org/docs/Linux-mini/...ing_to_windows

you'll need the smb backend, that step is in the instructions. what firewall is it?
 
Old 09-03-2004, 06:09 PM   #3
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
That site looks like exactly what I was looking for. The firewall is Symantec Client Firewall and it seems like it's configured properly. However, when I try to use smbclient to connect, I get the following:

Code:
added interface ip=IPHERE bcast=BCASTHERE nmask=NMASKHERE
session request to HISCOMPUTERNAME failed (Called name not present)
Domain=[MSHOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_DUPLICATE_NAME
What do I need to do to make this work?
 
Old 09-03-2004, 06:50 PM   #4
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
what does your smb.conf look like?
 
Old 09-03-2004, 11:25 PM   #5
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I'm not running samba currently... it was my understanding that you need it to let Windows hosts access shares on your machine but that you could do the reverse with something like smbclient without setting up smb.conf, etc. I've done this before (used smbclient to view and access the shares on a Windows box without having specifically set up a smb.conf), but I was connect to a Win98 instead of WinXP machine... maybe that makes a difference? If I'm misunderstanding something let me know.
 
Old 09-04-2004, 12:45 AM   #6
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Actually, it looks like using the IP address instead of the name might work (I still need to make some more changes to the firewall before I'm sure). I'd say that doesn't sound like it would make any difference, but I had a previous experience with smbclient where an IP failed and the name worked, so I'm not surprised. However, I was reading the link you gave me in more detail and I see now that I don't have a ppd for the printer. A quick search through sites like linuxprinting.org doesn't even list the printer (Dell Photo 720). Is there a "default" ppd I can use to get this to work, or will it not even be possible to print from Linux unless I have an exact ppd file for that particular printer? Thanks again.
 
Old 09-04-2004, 02:25 PM   #7
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
i googled fairly extensively for the ppd, w/out much success. the dell printers are made by lexmark i believe, so you might have some success w/this

http://www.lexmark.com/US/products/i.../download.html

good luck.
 
Old 09-04-2004, 04:57 PM   #8
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Ok, now I can use smbclient -L //HISIP to view the shares and printer, but "lpadmin -p DefaultPrinter -v smb://HISIP/PRINTERNAME -P /usr/share/cups/model/stphoto.ppd" gives me "lpadmin: Unable to connect to server: Connection refused." What could be wrong?
 
Old 09-07-2004, 06:02 PM   #9
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
is the cups daemon running? can you connect to

http://localhost:631

from a web browser?
 
Old 09-09-2004, 03:00 PM   #10
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Now I'm a little confused. In another post I thought I was told that the CUPS daemon only had to be running if you wanted your computer to act as a print server but that you could connect to other computers without it. Anyway, I typed "cupsd" and then tried it again, and I got a little further. I followed the instructions on that site (lpadmin, enable, accept) and didn't get any errors. However, when I tried to use lp or lpr to print a file, I get the following:

Code:
Status Information, attempt 1 of 3:
sending job 'root@MYUSERNAME+955' to DefaultPrinter@localhost
 connecting to 'localhost', attempt 1
 cannot open connection to localhost - No such file or directory
Make sure the remote host supports the LPD protocol
Waiting 10 seconds before retry
I'm a little confused why it's trying to use localhost, since I used the ip of the other computer in the lpadmin commands. What should I try now?
 
Old 09-09-2004, 05:51 PM   #11
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
did you check for the smb backend?

http://www.faqs.org/docs/Linux-mini/...ows_cupsconfig

good luck.

<edit>you may also find some useful info here

http://www.cups.org/sam.html#MANAGING_PRINTERS </edit>

Last edited by Peacedog; 09-09-2004 at 05:52 PM.
 
Old 09-09-2004, 06:15 PM   #12
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I originally did set up the backend but when I checked the symlink with "ls -l" the 'which smbspool' hadn't worked and it had linked to "which smbspool" instead of the output of that command. I remade the link so it now points to "/usr/bin/smbspool." However, I do everything I did before and I still get the exact same error as above. I also tried using the samba web interface and it failed every way I try it. I have the hostname set up in /etc/hosts but I can't even use the name with smbclient or I get an error... I have to use the IP. I tried both the name and the IP in the web interface and neither will print a test page. When I use the IP, the printer state is: "cli_session_request() failed..." Any other ideas?

EDIT:
When I use the hostname instead of the IP, the printer state is: "Unable to connect to SAMBA host, will retry in 60 seconds...ERROR: cli_session_request() failed..." I had another idea about what could be going wrong... does a specific port need to be open on the windows box for this to work? I can use smbclient to view/access the shares on that computer, but I thought maybe printing is trying to use another port that is blocked and needs to be opened up in the firewall.

Last edited by jrdioko; 09-09-2004 at 06:17 PM.
 
Old 09-09-2004, 06:32 PM   #13
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
you could try turning the firewall off to see if that is the issue? were you able to find a compatible ppd file, as that also could be the issue. have you been able to get smbclient -L to work w/the netbios name of the windows box? if not, try adding it to /etc/hosts in this format

xxx.xxx.xxx.xxx netbiosname

you'll have to restart services for the changes to take effect, for the network, or for cups.
good luck.
 
Old 09-09-2004, 07:06 PM   #14
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I tried changing the /etc/hosts entry to the real name of the windows box and smbclient now works perfectly that way. Now when I set it up in the web interface, I get the following error when trying to print a test page: "SMB tree connect failed: NT_STATUS_ACCESS_DENIED" (even when the firewall is turned off). As for the ppd, I couldn't find one that fit perfectly, but I've just been trying ones that sound generic or the "Raw" format option in the web client. I read about ppds a little and it sounds like using the wrong ppd should just mess up formatting and things like that rather than giving an error like access denied. Does this give any more hints as to what the problem could be or do I need to do more in-depth ppd experimenting?
 
Old 09-09-2004, 07:16 PM   #15
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
It could be a ppd problem, or a filter problem, or an smb backend problem. I had a similar problem w/my freebsd installation which stumped me for a while, until I found the proper foomatic scripts. what are you using for the uri?
 
  


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
Printing to a TCP/IP Network Printer AndeAnderson Linux - Newbie 8 10-18-2005 03:24 PM
hp network printer not printing? mepis 3.3 murfman89 Linux - Networking 0 06-12-2005 03:18 PM
Printing to network printer KHAAAN Linux - Networking 1 07-05-2004 08:34 PM
help cups printing to network printer sledgexiv Linux - Newbie 0 09-23-2003 07:39 PM
Printing to remote printer on network manderson Linux - Hardware 0 05-02-2002 05:16 PM


All times are GMT -5. The time now is 04:22 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