LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-28-2007, 02:00 PM   #1
protonic
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Rep: Reputation: 0
Completely newbie in linux LAN printing


Hello there!

I am a completely newbie in Linux, so I have some problem in printing.

I have a LANwith 3 PCs, all Fedoracore5.
One of them has an HP LaserJet 3050 connected, shared, this is PC1.
It can print, everything is Ok here.


The others can see the printer in 'Browsed queues' but cannot print at all.
Why, I don't know, and this is my problem

If I try to add manually the printer, I get stuck in choosing IPP or what else is there, so far no combination was successful.

Can you help me? How can I print from the others PCs?

I have disables firewall and SElinux.

Best regards
Tony

Disclaimer: this PC seems to have a broken keyboard so there are missing spaces sometimes, like the title.
Admin, can you fix this, I don't know how, seems that only the message body can be edited. Sorry

Last edited by protonic; 01-28-2007 at 02:17 PM. Reason: bad keyboard
 
Old 01-29-2007, 10:26 AM   #2
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Have you installed cups on all three machines? I would assume you have it installed on PC1, the one that prints. In linux, it should be easy to add a remote printer on a lan attached machine through cups. You do have to be the administrator to do so.

To add the printer on a remote machine, say PC2, open a web browser, ( after you have cups installed and running ) and enter http://localhost:631 in the URL bar, press enter. That will connect you to cups. Click on Administration Tasks and it will ask you for user and password. From there you can add a remote printer. You need to know the name of the printer, the driver, ( same as PC1 ). There are examples of how to fill in the Device field.

I can print from my Ubuntu system to my Mandriva system, and the Mandriva system has the printer parallel port attached. The Device URI I used is ipp://192.168.1.21/printers/4039 Things to change for you would be the IP address of PC1 would go where 192.168.1.21 is, the word 'printers' needs to be there, and the field 4039 you would replace with the name you gave your printer on PC1. I spent a bit of time finding this information in the cups documentation.

Hope this helps.
 
Old 02-01-2007, 03:35 AM   #3
protonic
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Well, this seems to be the info I need so badly (ipp://192.168.1.21/printers/4039).

I have several independent LANs, all having at least one HP 3015 printer, sometimes there is an HP LaserJet 1320, the driver I use is PCL5 for all of them - I suppose this would be the most compatible driver.
All these printers are USB printers.


The fact is that installing FC5 on several PCs I got some experience in clicking NEXT ( ), configuring and sharing internet, including ADSL USB modems as SpeedTouch 330, but printing is a disaster for me.

I have to mention that first two PCs do print to the other even today and I don't have a clue why they do and no other LAN I built based on FC5 can print at all, except to the local printer.

I will try this as soon as possible and come back..
Thank you very much
Tony
 
Old 02-01-2007, 09:30 AM   #4
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
For the best printing information on drivers for printers I look them up here www.linuxprinting.org. For your 3015, here is the recommended driver, at this link. http://www.linuxprinting.org/show_pr...-LaserJet_3015
For your 1320's here is the recommendation. http://www.linuxprinting.org/show_pr...-LaserJet_1320

I'm not sure what you mean by "independant LAN". Are you implying they are in no direct way connected with routers or bridges?

Let us know how it goes.
 
Old 02-09-2007, 01:56 PM   #5
protonic
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by camorri
Are you implying they are in no direct way connected with routers or bridges?
Let us know how it goes.
Yes, there are several locations in different cities, they only have in common the internet (they do not connect to each other, they all use the same remote db) and the telephone.

Well, let's resume:
I tried IPP with "ipp://10.10.10.10" and "/printers/hp-laserjet-3050-1", but the best results was something like:" Could not connect to... : Success"

Yes, after the error message was that 'Success', which I really don't know what it means.

Also I tried that http://localhost:631, but it works only on local machine, isn't this supposed to work over the network also?
I get some message that access is denied, even SElinux and firewall are disabled everywhere, as I have a router between LAN and internet.


More, even if I see the printer from the other computer in 'Browsed queue' I cannot manage this using localhost:631 because when I click any button for that printer, the browser tries to solve the computer name - and usually does - and gets an internet page somehow related to that name! So a printer found in 'Browsed queue' is not manageable with localhost:631.


What am I doing wrong?


One more question: what is the 'Location unknown' message in printer gui conf?
It means that the printer cannot be found or that I haven't filled the location of the printer when installed?
Is this critical or just some info?
 
Old 02-09-2007, 03:29 PM   #6
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Quote:
I tried IPP with "ipp://10.10.10.10" and "/printers/hp-laserjet-3050-1", but the best results was something like:" Could not connect to... : Success"
If the above information is correct, I believe you need to try "ipp://10.10.10.10/printers/hp-laserjet-3025-1" This is three fields. The IP address is the address of the server, the work printers is required, according to the cups doc ( I don't know why ), and the last field is the name you gave the printer. I don't have a clew why the word 'success' shows up, if nothing is printing.

Quote:
Also I tried that http://localhost:631, but it works only on local machine, isn't this supposed to work over the network also?
First part, yes localhost is your loopback interface name that equates to 127.0.0.1. The 631 is the port Cups listens on. So, to get this to work to another machine, change the first part to a fully qualified name, or use the IP address of the target Cups server. Either will work. The fully qualified name will only work if the DNS servers know that machine.

Quote:
More, even if I see the printer from the other computer in 'Browsed queue' I cannot manage this using localhost:631
You can only manage a printer from Cups on the server that supports it. You can connect to cups from a remote machine as I described above.

Quote:
One more question: what is the 'Location unknown' message in printer gui conf?
It means that the printer cannot be found or that I haven't filled the location of the printer when installed?
Is this critical or just some info?
I'm not sure I understand this question. Could you let me know which panel this question is about.
 
Old 02-09-2007, 04:20 PM   #7
protonic
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Original Poster
Rep: Reputation: 0
I forgot to mention, I did try:'http://10.10.10.10:631'. This is where I got 'access is denied' (or so, I don't remember exactly)

The 'location unknown' shows right most to the printer name, shared and default icon, imediately that I open the print config GUI.
Same message appears in localhost:631, in first or second line that describes the printer.

Maybe some screenshots will help?

About
I tried IPP with "ipp://10.10.10.10" and "/printers/hp-laserjet-3050-1", but the best results was something like:" Could not connect to... : Success"

I quoted wrong here, there a two fields to fill when choosing IPP protocol, first is the server address:"//10.10.10.10", not "ipp://10.10.10.10", and the second is "/printers/hp-laserjet-3050-1". I quote from memory and as I am not so familiar with Linux, I might slip some details.

I am newbie in Linux, but I have several years in networking and windows.



Another idea:

can I use Samba to share a printer among two Linux machines?
If so, how do I share a printer using Samba?
Would this be easier? From times to times, a Windows portable connects to the network and needs to print some documents.

thank you for your help
 
Old 02-10-2007, 02:01 PM   #8
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
I would like to ask you for some clarification on some points.

Are you trying to print from one lan to the other lan ? Or are you trying to set up printing on local lans only?

You mentioned an IP address of 10.10.10.10 Which PC is this? Is it the one with the attached printer? Or is a machine without a printer?

Here is a link you may find useful.

http://gentoo-wiki.com/HOWTO_Linux_p...ring_with_CUPS

It describes how to set up Cups on the print server and the client. It may help you get this going faster than I can.

Let me know.
 
Old 02-12-2007, 01:46 PM   #9
protonic
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by camorri
You mentioned an IP address of 10.10.10.10 Which PC is this? Is it the one with the attached printer? Or is a machine without a printer?
Yes, it's the PC with the printer attached to it.

No need to print over the internet, locations are independent, I only need to print inside LANs.
I mentioned them just because I have the same problem on each and every LAN.

Now, I followed the tutorial that you pointed me to, but the same no results.

I cannot browse to it, http://10.10.10.10:631 shows unable to connect, either from print server or other PC.

Again, SElinux and firewall are disabled and I don't know what else to do.

In this tutorial shows that I have to have a line
Port 631
uncomented. Where exactly this line should be placed? I've placed it between the <Location></Location> tags.
Also, line
#Listen *:631
should be comented out. I found this line and did it.

Seems so simple in that tutorial and keeps not working, I am boiling sometimes...


I cannot attach files here? - or I don't know how - and I would not paste my cupsd.conf here, cause it's a mile long.


Please help me!

Later edit:

uncomenting a line in folowing passage
"
########
######## Network Options
########

#
# Ports/addresses that we listen to. The default port 631 is reserved
# for the Internet Printing Protocol (IPP) and is what we use here.
#
# You can have multiple Port/Listen lines to listen to more than one
# port or address, or to restrict access:
#
# Port 80
# Port 631
# Listen hostname
# Listen hostname:80
# Listen hostname:631
# Listen 1.2.3.4
# Listen 1.2.3.4:631
"

the line that sais Port 631, gives me an eror 98 when trying to restart cups service.
Comented out, problem vanished, but still not working...


Some more:

I added the IPP printer on another PC, and I get an error for the test page:
"There was a problem sending CUPS test page to '1320' queue:
lpr error - unable to print file: client-error-forbidden"

Also, I can telent to linux-print-server 631, but I get disconected imediately, whatever key I press.
"telnet linux-print-server 631
Trying 10.10.10.10...
Connected to linuxprintserver.localdomain (10.10.10.10)
Escape character is '^]'

Connection closed by foreign host."

In browser, I get:
"Forbidden

You don't have permision to access the resource on this server"


Any idea?

Last edited by protonic; 02-12-2007 at 02:19 PM.
 
Old 02-12-2007, 02:01 PM   #10
protonic
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Original Poster
Rep: Reputation: 0
(Admin: how do I delete my post? Please delete this)

Last edited by protonic; 02-12-2007 at 02:03 PM.
 
Old 02-12-2007, 03:56 PM   #11
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Have a look at /etc/cups/cupsd.conf for who is being "allowed and denied". Here is what mine looks like. Note the second allow is my local lan. If you do not have this entry, or it does not match your local lan, the "deny all" will prevail.

Code:
## Restrict access to local domain
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.1.*
</Location>
This is where port 631 is in my cupsd.conf file.

Code:
# Ports/addresses that are listened to.  The default port 631 is reserved
# for the Internet Printing Protocol (IPP) and is what is used here.
# 
# You can have multiple Port/Listen lines to listen to more than one
# port or address, or to restrict access.
# 
# Note: Unfortunately, most web browsers don't support TLS or HTTP Upgrades
# for encryption.  If you want to support web-based encryption you will
# probably need to listen on port 443 (the "HTTPS" port...).
# 
# ex: 631, myhost:80, 1.2.3.4:631
#
#    Port 80
#    Port 631
#    Listen hostname
#    Listen hostname:80
#    Listen hostname:631
#    Listen 1.2.3.4
#    Listen 1.2.3.4:631
#
#Port 631

Listen *:631

# Log
I don't know how important it is for the location in the file.

I'm going to do some more looking around, and I'll post back....
 
Old 02-13-2007, 01:52 AM   #12
protonic
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Code:
Allow From 192.168.1.*
I have this line, saying
Allow From 10.10.10.* - my LAN

Code:
#
#Port 631

Listen *:631
This I have the other way, I have uncommented the Port 631 line, and commented out the other, like in the tutorial.


Where I can download an clean cupsd.conf file, I am afraid I have tampered with each and everyone, and I wasn't clever enough to make a backup before all this?
 
Old 02-13-2007, 08:57 AM   #13
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Quote:
Where I can download an clean cupsd.conf file, I am afraid I have tampered with each and everyone, and I wasn't clever enough to make a backup before all this?
I would suggest you use the package manager, remove cups, and re-install. That will give you a new cupsd.conf file.
 
Old 02-13-2007, 09:14 AM   #14
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
One more thought on what might be blocking port 631. Have a look for these files:

/etc/hosts.deny

/etc/hosts.allow

On the first ( hosts.deny ) look for a line like "portmap:ALL" If this is there, then it is blocking the use of inet.

Then look at hosts.allow. You can add a line like this to allow systems on your local lan to access inet service.

Code:
portmap: 192.168.1.20 , 192.168.1.21
Just add a list of IP's separated with commas for each machine you want using the service.
 
Old 02-13-2007, 10:05 AM   #15
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
One more thought, I re-read the thread, and I don't think we established your system is listening on port 631. Here is how to verify that. Open a knosole and run the following command - "netstat -a | grep tcp". On my system the output looks like this:

Code:
netstat -a | grep tcp
tcp        0      0 *:8001                      *:*                         LISTEN
tcp        0      0 *:1025                      *:*                         LISTEN
tcp        0      0 *:nfs                       *:*                         LISTEN
tcp        0      0 *:772                       *:*                         LISTEN
tcp        0      0 *:swat                      *:*                         LISTEN
tcp        0      0 *:netbios-ssn               *:*                         LISTEN
tcp        0      0 *:sunrpc                    *:*                         LISTEN
tcp        0      0 *:10000                     *:*                         LISTEN
tcp        0      0 *:x11                       *:*                         LISTEN
tcp        0      0 *:ftp                       *:*                         LISTEN
tcp        0      0 *:ssh                       *:*                         LISTEN
tcp        0      0 *:ipp                       *:*                         LISTEN
*:ipp is the port. I connected to cups from my latop, here is what I saw when a session is established.

Code:
tcp        0      0 *:ipp                       *:*                         LISTEN
tcp        0      0 *:890                       *:*                         LISTEN
tcp        0      0 *:microsoft-ds              *:*                         LISTEN
tcp   111277      0 192.168.1.21:4120           sc6.lga.llnw.net:12260      ESTABLISHED
tcp        0      0 192.168.1.21:nfs            Presto:1019                 ESTABLISHED
tcp        0      0 192.168.1.21:nfs            Presto:1018                 ESTABLISHED
tcp        0      0 192.168.1.21:ipp            Presto:3077                 TIME_WAIT
tcp        0      0 192.168.1.21:ipp            Presto:3078                 ESTABLISHED
Note: Presto is my laptop, now "ESTABLISHED" on ipp.


If you still can not get it to connect, then we need to find out if there is a log that would let us know why not.
 
  


Reply

Tags
network printing, networking, printer sharing, printing


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



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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration