LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Network printing CUPS-LPD problem. (https://www.linuxquestions.org/questions/linux-software-2/network-printing-cups-lpd-problem-354261/)

chuki 08-17-2005 01:13 PM

Network printing CUPS-LPD problem.
 
I am running Fedora Core 4 on AMD 64 bit Opteron Dual Processors
and have HP LaserJet 2300 attached to it. Printer works fine (print test page). I want to share this printer with the other machine running Linux RedHat kernel 2.4.24.
On my side I have cups-libs-1.1.23-15 and xinetd-2.3.13-6 installed, since they were not were with default installation.
I have
cupsd (pid 19905) is running...
cups-config-daemon (pid 19892) is running...
xinetd (pid 19930) is running...

xinetd based services:
chargen: off
chargen-udp: off
cups-lpd: on
cvs: off

these are lines from /etc/cups/cupsd.conf

<Location /printers/HPLaser2300>
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
AuthType None
Allow from All
</Location>

<Location /printers/MyPrinter>
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
AuthType None
</Location>


Browsing On
BrowseProtocols cups
BrowseOrder Deny,Allow
BrowseAllow from @LOCAL
BrowseAddress 255.255.255.255
Listen *:631

I enable sharing of the printer in system-config-printer-gui for all hosts and enable LPD protocol as well.


On the client machine I tried to add UNIX printer LPD queue
with the the server my Fedora machine and queue name "HPLaser2300"

Once I finished it and try to see statistics by
lpq -a

I get that

Printer 'HPLaser2300@FEDORA' - cannot open connection - No route to host


I thought there might be problem with firewall on FEDORA so some of the ports are not allowed.

so I tried to add UNIX LPD printer on my FEDORA machine
I called it "MyPrinter"

after I tried to print a test page I got

"Remote host did not respond with the comand status byte after 300 second"
in the description column, and in the log file I see

D [17/Aug/2005:13:04:15 -0500] AcceptClient: 6 from localhost:631.
D [17/Aug/2005:13:04:15 -0500] ReadClient: 6 POST / HTTP/1.1
D [17/Aug/2005:13:04:15 -0500] ProcessIPPRequest: 6 status_code=1
D [17/Aug/2005:13:04:15 -0500] CloseClient: 6
D [17/Aug/2005:13:04:19 -0500] AcceptClient: 6 from localhost:631.
D [17/Aug/2005:13:04:19 -0500] ReadClient: 6 POST / HTTP/1.1
D [17/Aug/2005:13:04:19 -0500] ProcessIPPRequest: 6 status_code=1
D [17/Aug/2005:13:04:19 -0500] ReadClient: 6 POST / HTTP/1.1
D [17/Aug/2005:13:04:20 -0500] ProcessIPPRequest: 6 status_code=1
D [17/Aug/2005:13:04:20 -0500] ReadClient: 6 POST / HTTP/1.1
D [17/Aug/2005:13:04:20 -0500] ProcessIPPRequest: 6 status_code=0
D [17/Aug/2005:13:04:20 -0500] CloseClient: 6
D [17/Aug/2005:13:04:20 -0500] AcceptClient: 6 from localhost:631.
D [17/Aug/2005:13:04:20 -0500] ReadClient: 6 POST /printers/MyPrinter HTTP/1.1
D [17/Aug/2005:13:04:20 -0500] print_job: auto-typing file...
D [17/Aug/2005:13:04:20 -0500] print_job: request file type is application/postscript.
D [17/Aug/2005:13:04:20 -0500] check_quotas: requesting-user-name = 'root'
D [17/Aug/2005:13:04:20 -0500] print_job: requesting-user-name = 'root'
I [17/Aug/2005:13:04:20 -0500] Adding start banner page "none" to job 19.
I [17/Aug/2005:13:04:20 -0500] Adding end banner page "none" to job 19.
I [17/Aug/2005:13:04:20 -0500] Job 19 queued on 'MyPrinter' by 'root'.
D [17/Aug/2005:13:04:20 -0500] Job 19 hold_until = 0
D [17/Aug/2005:13:04:20 -0500] ProcessIPPRequest: 6 status_code=0
D [17/Aug/2005:13:04:20 -0500] CloseClient: 6
D [17/Aug/2005:13:04:30 -0500] AcceptClient: 6 from localhost:631.
D [17/Aug/2005:13:04:30 -0500] ReadClient: 6 POST / HTTP/1.1
D [17/Aug/2005:13:04:30 -0500] ProcessIPPRequest: 6 status_code=1
D [17/Aug/2005:13:04:30 -0500] CloseClient: 6


so what did I do wrong?
thank you

peter_robb 08-17-2005 04:59 PM

Change your "Order Deny,Allow" to "Order Allow,Deny"

Everything is hitting the Deny All block first and stopping..

Then place the Allow lines in the order you need.. eg,
Allow From 127.0.0.1
Allow From 192.168.1.0/24
Deny From All

Same with the Browse section..

The idea of the Order is to allow the most specific definition first and the most general last..
eg to block 3 pcs but allow the rest of the subnet..


All times are GMT -5. The time now is 02:55 PM.