Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lpd network permissions problems

0 views
Skip to first unread message

doug reeder

unread,
Nov 21, 2000, 3:00:00 AM11/21/00
to

I have lpr working fine when it prints to a printer connected to the
parallel port, but other machines cannot print to this print queue
over the network:

[root@slendro /root]# lpr /etc/fstab
[root@slendro /root]# lpq
slendro.som.ohio-state.edu: sending to yodel.som.ohio-state.edu
Rank Owner Job Files Total Size
1st root 7 /etc/fstab 915 bytes

connection to yodel.som.ohio-state.edu is down


The printcap entry on the machine with the printer attached is:

##PRINTTOOL3## LOCAL laserjet 300x300 letter {} LaserJet Default {}
lp:\
:sd=/var/spool/lpd/lp:\
:mx#0:\
:sh:\
:lp=/dev/lp0:\
:if=/var/spool/lpd/lp/filter:

The printcap entry on the machine trying to print over the network is:

##PRINTTOOL3## REMOTE
lp:\
:sd=/var/spool/lpd/lp:\
:mx#0:\
:sh:\
:rm=yodel.som.ohio-state.edu:\
:rp=lp:

I have added the remote machine to the hosts.lpd file on the machine
with the printer:

[root@yodel /root]# cat /etc/hosts.lpd
# hosts.lpd
eroica.som.ohio-state.edu
tactus.som.ohio-state.edu
slendro.som.ohio-state.edu

lpd is running fine on both hosts:

[root@yodel /root]# /etc/rc.d/init.d/lpd status
lpd (pid 667 513) is running...
[root@yodel /root]# ps -e | grep lp
513 ? 00:00:00 lpd
667 ? 00:00:00 lpd


[root@slendro /root]# /etc/rc.d/init.d/lpd status
lpd (pid 777 513) is running...
[root@slendro /root]# ps -e | grep lp
513 ? 00:00:00 lpd
777 ? 00:00:00 lpd


and all other network communication between the two machines runs fine.

Is there some other place I need to enable this?

--
P. Douglas Reeder Lecturer, Computer. Science. Dept., Ohio State Univ..
ree...@cis.ohio-state.edu http://www.cis.ohio-state.edu/~reeder/reeder.html
GE/S d+ s+:- a C+@$ UH+ P+ L E W++ N+ o? K? w !O M+ V PS+() PE Y+ PGP- t 5+ !X
R>+ tv+ b+++>$ DI+ D- G e+++ h r+>+++ y+>++

Bob Martin

unread,
Nov 21, 2000, 3:00:00 AM11/21/00
to
doug reeder wrote:

[ snip ]


May or may not make a difference but I just put the hostname ( tactus )
and not the FQDN in the hosts.lpd file with an entry in hosts.

Also I don't think you should have two instances of lpd running. I saw
this before when there was bad data in printcap, lpd would not function.
The second instance was a fork from the first that was hung.
--

Bob Martin

Bill Unruh

unread,
Nov 22, 2000, 3:00:00 AM11/22/00
to
In <8vf114$f5e$1...@news.cis.ohio-state.edu> ree...@cis.ohio-state.edu (doug reeder) writes:

Yes, I have had this problem as well. Then after a few hours it went
away (I tried killing the lpd daemon on both machines and restarting
numberous times). Then suddenly it started working.
There is something very very weird with lpd.

]I have lpr working fine when it prints to a printer connected to the


]parallel port, but other machines cannot print to this print queue
]over the network:

][root@slendro /root]# lpr /etc/fstab
][root@slendro /root]# lpq
]slendro.som.ohio-state.edu: sending to yodel.som.ohio-state.edu
]Rank Owner Job Files Total Size
]1st root 7 /etc/fstab 915 bytes

]connection to yodel.som.ohio-state.edu is down


]The printcap entry on the machine with the printer attached is:

]##PRINTTOOL3## LOCAL laserjet 300x300 letter {} LaserJet Default {}
]lp:\
] :sd=/var/spool/lpd/lp:\
] :mx#0:\
] :sh:\
] :lp=/dev/lp0:\
] :if=/var/spool/lpd/lp/filter:

]The printcap entry on the machine trying to print over the network is:

]##PRINTTOOL3## REMOTE
]lp:\
] :sd=/var/spool/lpd/lp:\
] :mx#0:\
] :sh:\
] :rm=yodel.som.ohio-state.edu:\
] :rp=lp:

]I have added the remote machine to the hosts.lpd file on the machine

Bill Unruh

unread,
Nov 22, 2000, 3:00:00 AM11/22/00
to
In <3A1B1316...@ayrix.net> Bob Martin <bma...@ayrix.net> writes:

>May or may not make a difference but I just put the hostname ( tactus )
>and not the FQDN in the hosts.lpd file with an entry in hosts.

In my case I had this set up exactly this way. And still it did not work
for a long time.

>Also I don't think you should have two instances of lpd running. I saw
>this before when there was bad data in printcap, lpd would not function.
>The second instance was a fork from the first that was hung.
>--

The lpd daemon spaws itself whenever there is work to be done. Doing a
tcpdump my daemon would send a message over the remote printer machine,
and would get answers back and then everything would hang. So I suspect
that the second daemon was spawned to handle the job and then something
got in the way.


>Bob Martin

Bob Martin

unread,
Nov 24, 2000, 3:00:00 AM11/24/00
to
Bill Unruh wrote:
> The lpd daemon spaws itself whenever there is work to be done. Doing a
> tcpdump my daemon would send a message over the remote printer machine,
> and would get answers back and then everything would hang. So I suspect
> that the second daemon was spawned to handle the job and then something
> got in the way.
>

Yes, and when you start lpd it will fork for each entry in
printcap ( you can run strace on lpd and see this ). It's
doing some verification of the entry. I had one that I had
not finished and broke lpd when it hit it. If you kill the
second daemon, it will start working again.

--

Bob Martin

0 new messages