lpd - can't connect? lpd.perms OK?

lpd - can't connect? lpd.perms OK?

Post by James Kea » Tue, 28 Oct 1997 04:00:00



Hi, I am having an terrible time priting since I reinstalled
slackware.  I get the following erros when I try and print.

norstar:~$ ls | lpr


norstar:~$

I am not sure why it is trying to "connect:" like htis, it didnt do
this before.   I read the lpd manpages and the lpd.perms
file is set up exactly how they say it should be.  Is there something
else I should be doing?


----/etc/lpd.perms:

###########################################################################
# LPRng - An Extended Print Spooler System
#
# Copyright 1988-1995 Patrick Powell, San Diego State University

# See LICENSE for conditions of use.
#
###########################################################################
# MODULE: TESTSUPPORT/printer_perms.proto
# PURPOSE: prototype printer permissions file
# $Id: lpd.perms,v 3.1 1997/01/22 23:15:38 papowell Exp $
##########################################################################
# Printer permissions data base
## #
##                  LPRng - An Enhanced Printer Spooler
##                     lpd.perms file

##
## Access control to the LPRng facilities is controlled by entries
## in a set of lpd.perms files.  The common location for these files
## are: /etc/lpd.perms,  /usr/etc/lpd.perms, and  /var/spool/lpd/lpd.perms.
## The locations of these files are set by the printer_perms_path entry
## in the lpd.conf file or by compile time defaults in the src/common/defaults.c
## file.  In addition to the global permissions files,  each spool queue
## can also have a permissions file.  This file is searched when information
## or operations on a specific printer is requested.
##
## Each time the lpd server is given a user request or carries out an unspooling
## operation,  it searches to the perms files to determine if the action
## is ACCEPT or REJECT.  The first ACCEPT or REJECT found terminates the search.
## If none is found,  then the last DEFAULT action is used.
##
## Permissions are checked by the use of 'keys' and matches.  For each of
## the following LPR activities,  the following keys have a value.
##
## Key          Match Connect Job   Job    LPQ  LPRM  LPC
##                            Spool Print
## SERVICE      S     'X'     'R'   'P'    'Q'  'M'   'C,S'
## USER         S     -       JUSR  JUSR   JUSR JUSR  JUSR
## HOST         S     RH      JH    JH     JH   JH    JH
## GROUP        S     -       JUSR  JUSR   JUSR JUSR  JUSR
## IP           IP    RIP     JIP   JIP    RIP  JIP   JIP
## PORT         N     PORT    PORT  -      PORT PORT  PORT
## REMOTEUSER   S     -       JUSR  JUSR   JUSR CUSR  CUSR
## REMOTEHOST   S     RH      RH    JH     RH   RH    RH
## REMOTEGROUP  S     -       JUSR  JUSR   JUSR CUSR  CUSR
## REMOTEIP     IP    RIP     RIP   JIP    RIP  RIP   RIP
## CONTROLLINE  S     -       CL    CL     CL   CL    CL
## PRINTER      S     -       PR    PR     PR   PR    PR
## FORWARD      V     -       -     SA     -    SA    SA
## SAMEHOST     V     -       SA    -      SA   SA    SA
## SAMEUSER     V     -       -     -      SU   SU    SU
## SERVER       V     -       SV    -      SV   SV    SV
##
## KEY:
##   JH = HOST          host in control file
##   RH = REMOTEHOST    connecting host name
##   JUSR = USER        user in control file
##   CUSR = REMOTEUSER  user from control request
##   JIP= IP            IP address of host in control file
##   RIP= REMOTEIP      IP address of requesting host
##   PORT=              connecting host origination port
##   CONTROLLINE=       pattern match of control line in control file
##   FW= IP of source of request = IP of host in control file
##   SA= IP of source of request = IP of host in control file
##   SU= user from request = user in control file
##   SA= IP of source of request = IP of server host
##
## Match: S = string with wild card, IP = IPaddress[/netmask],
##   N = low[-high] number range, V = exact value match.
## SERVICE: 'X' - Connection request; 'R' - lpr request from remote host;
##    'P' - print job in queue; 'Q' - lpq request, 'M' - lprm request;
##    'C' - lpc spool control request; 'S' - lpc spool status request
## NOTE: when printing (P action), the remote and job check values
##   (i.e. - RUSR, JUSR) are identical.
##
##
## The  special key letter=patterns searches the control file
## line starting with the (upper case) letter, and is usually
## used  with  printing  and  spooling  checks.  For example,
## C=A*,B* would check that the class information (i.e.- line
## in  the control file starting with C) had a value starting
## with A or B.
##
## A permission line consists of list of tests and an a result value
## If all of the tests succeed,  then a match has been found and the
## permission testing completes with the result value.  You use the
## DEFAULT reserved word to set the default ACCEPT/DENY result.
## The NOT keyword will reverse the sense of a test.
##
## Each test can have one or more optional values separated by
## commas. For example USER=john,paul,mark has 3 test values.
## #Do not allow forwarded jobs or requests
##   REJECT SERVICE=R,C,M FORWARD
##
# allow root on server to control jobs
ACCEPT SERVICE=C SERVER USER=root
REJECT SERVICE=C
#
# allow same user on originating host to remove a job
ACCEPT SERVICE=M SAMEHOST SAMEUSER
# allow root on server to remove a job
ACCEPT SERVICE=M SERVER USER=root
REJECT SERVICE=M
# all other operations allowed
DEFAULT ACCEPT

 
 
 

lpd - can't connect? lpd.perms OK?

Post by Ian Rawlin » Tue, 28 Oct 1997 04:00:00




> Hi, I am having an terrible time priting since I reinstalled
> slackware.  I get the following erros when I try and print.

> norstar:~$ ls | lpr

> job 'cfA543norstar.ourhouse.ca' transfer to

> norstar:~$

I had this problem, searching the various net databases for the
solution gave me the answer --- dump LPRNG and download the BSD LPR
archive instead. It's on sunsite and is called lpr-secure, once I'd
installed this (get magicfilter while you're there) then I had no
problems.

--
Ian Rawlings - ** decode anti-spam address to contact me **

 
 
 

lpd - can't connect? lpd.perms OK?

Post by James Kea » Tue, 28 Oct 1997 04:00:00




: > Hi, I am having an terrible time priting since I reinstalled
: > slackware.  I get the following erros when I try and print.
: >
: > norstar:~$ ls | lpr

: > job 'cfA543norstar.ourhouse.ca' transfer to

: > norstar:~$
:
: I had this problem, searching the various net databases for the
: solution gave me the answer --- dump LPRNG and download the BSD LPR
: archive instead. It's on sunsite and is called lpr-secure, once I'd
: installed this (get magicfilter while you're there) then I had no
: problems.
:
: --
: Ian Rawlings - ** decode anti-spam address to contact me **

Hi Ian, I did this at somebody's suggestion.  However I could not
get this to compile!  I am not sure if there is something wrong
with the header files I have in /usr/include, but I dont think so.
I kept gettting a compile error for lpr/common_files.c (or something).

Anyone of compiled executables of the BSD LPR suite for linux?


 
 
 

lpd - can't connect? lpd.perms OK?

Post by Keith Rohre » Wed, 29 Oct 1997 04:00:00





> > Hi, I am having an terrible time priting since I reinstalled
> > slackware.  I get the following erros when I try and print.

> > norstar:~$ ls | lpr

> > job 'cfA543norstar.ourhouse.ca' transfer to

> > norstar:~$

Probably your lpd (on norstar.ourhouse.ca) is dead; betcha "ps aux |
grep -i lpd" shows nothing but the grep.

I have a RedHat 4.2 system; the proper rc script runs, lpd is in the
path (according to echo commands I inserted into that rc script), but no
lpd.  However, firing it up by hand (once per reboot) does work.  Try
changing your startup scripts (/etc/rc.somethingorother, or something in
/etc/rc.d) to do lpd -D 5 -L /somewhere/useful in order to further
diagnose your particular problem.

Quote:> I had this problem, searching the various net databases for the
> solution gave me the answer --- dump LPRNG and download the BSD LPR
> archive instead. It's on sunsite and is called lpr-secure, once I'd
> installed this (get magicfilter while you're there) then I had no
> problems.

It was precisely my desire to use magicfilter in a sane way which led me
*away* from the BSD-derived code in the first place.

        Keith

 
 
 

lpd - can't connect? lpd.perms OK?

Post by James Kea » Wed, 29 Oct 1997 04:00:00


Hi you were right, lpd was NOT runing.  It was unable to find the
control files in /var/spool/lp1 (the spool directory for each of
the printers in my printcap).  When I looked at the output from the
lpd -D 5, it showed that it was trying to open these files.  I CREATED these
files but have no idea what should be in them (if anything).  Now when I
print, I dont get "connection refused" byt I still get:

norstar:~$ ls | lpr

failed after 1 attempts

LPD is running though.   Any idea what should be in these files in
/var/spool/lp1?  The printhing howto does not say much about LPRng and
the web page for the printing howto doesnt either (yet?).  

If anyone knows what could be wrong I would appreciate any clues :)

thanks



: >


: > > Hi, I am having an terrible time priting since I reinstalled
: > > slackware.  I get the following erros when I try and print.
: > >
: > > norstar:~$ ls | lpr

: > > job 'cfA543norstar.ourhouse.ca' transfer to

: > > norstar:~$
: Probably your lpd (on norstar.ourhouse.ca) is dead; betcha "ps aux |
: grep -i lpd" shows nothing but the grep.
:
: I have a RedHat 4.2 system; the proper rc script runs, lpd is in the
: path (according to echo commands I inserted into that rc script), but no
: lpd.  However, firing it up by hand (once per reboot) does work.  Try
: changing your startup scripts (/etc/rc.somethingorother, or something in
: /etc/rc.d) to do lpd -D 5 -L /somewhere/useful in order to further
: diagnose your particular problem.
:  
: > I had this problem, searching the various net databases for the
: > solution gave me the answer --- dump LPRNG and download the BSD LPR
: > archive instead. It's on sunsite and is called lpr-secure, once I'd
: > installed this (get magicfilter while you're there) then I had no
: > problems.
: It was precisely my desire to use magicfilter in a sane way which led me
: *away* from the BSD-derived code in the first place.
:
:       Keith

 
 
 

lpd - can't connect? lpd.perms OK?

Post by Dave Ulric » Thu, 30 Oct 1997 04:00:00



>Hi, I am having an terrible time priting since I reinstalled
>slackware.  I get the following erros when I try and print.

I've managed to get LPRng working on Slackware 3.2, so I'll try to
help you out.

>norstar:~$ ls | lpr


>norstar:~$

>I am not sure why it is trying to "connect:" like htis, it didnt do
>this before.   I read the lpd manpages and the lpd.perms
>file is set up exactly how they say it should be.  Is there something
>else I should be doing?

Have you defined an IP address for norstar.ourhouse.ca in /etc/hosts?
If it doesn't have a full-time IP address, 127.0.0.1 should work.

Try adding the following ACCEPT statements as well:

Quote:>----/etc/lpd.perms:
[munch]
># allow root on server to control jobs
>ACCEPT SERVICE=C SERVER USER=root

ACCEPT SERVICE=C HOST=localhost USER=root
Quote:>REJECT SERVICE=C
>#
># allow same user on originating host to remove a job
>ACCEPT SERVICE=M SAMEHOST SAMEUSER
># allow root on server to remove a job
>ACCEPT SERVICE=M SERVER USER=root

ACCEPT SERVICE=M HOST=localhost USER=root

>REJECT SERVICE=M
># all other operations allowed
>DEFAULT ACCEPT


Dave
--
===========================================================================

Northern Illinois University
DeKalb, IL, USA
 
 
 

1. Can someone post lpd.conf and lpd.perm files

Dear Gurus:

        Now that I installed Slackware 3.2.  The printing system changed to
LPRng.  The following are the screen messages I got



/usr/lib/lpd: : Malformed from address

usr/lib/lpd: : Malformed from address

attempts

Can someone help me?

Xinfu Xia
Department of Biophysics and Biochemistry
University of North Carolina at Chapel Hill
Chapel Hill, NC 27599
Phone:  (919)-966-8625

2. Help Needed with routing problem....

3. lpd: Fatal error - Cannot bind to lpd port '515'

4. OpenGL for Quake3 under Radeon??

5. lpd on commanline does nothing...and it's there at /usr/sbin/lpd ?

6. AFPS dead end

7. Linux's LPD problem... any newer lpd?

8. Linux support Evergreen 586 upgrade?

9. lpd on commandline does nothing...and it's there at /usr/sbin/lpd ?

10. sco server can't connect to LPD's

11. Setting up plp/lpd for lpd only

12. lpd to lpd

13. remote printer for other unix...lpd, host.lpd, etc