Bug 237

Summary: lpd won't print if user is not local
Product: [Retired] Red Hat Linux Reporter: rrd
Component: lprAssignee: Cristian Gafton <gafton>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-02-17 17:07:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description rrd 1998-11-30 18:39:09 UTC
lpd does not print job if user is not local.

Symptom:  user on remote machine (irix6.5, but it doesn't
seem to matter.  I have similar failures from other OS's),
who does not have an account on printserver, attempts to
print to my printer.  I have lpd run with -l so it logs as
much as it will.  I get:

  Nov 30 11:50:41 admin7 lpd[13032]: us: job could not be
printed (cfA141iris20.amherst.com)

in syslog.

In fixing it for my installation, I believe the problem is
that elsewhere in printit() in $lprsrc/lpd/printjob.c, a
non-null value is assumed for getpwnam(logname), and when
this fails it gives the above error message.

I am not a C programmer - this fix may be the wrong way to
do this, and may break other functionality.  It should point
out what the cause of the problem is, though.

My patch follows:
[aerie:lpd/]$ diff printjob.c printjob.c.new
>                       /*
>                        * added 19981130: rrd to allow
printing from remote
>                        * hosts without requiring local
username.  Not sure
>                        * it's the *right thing* to do
>                        */
>                       else {
>                               if (getpwnam(logname) ==
>                               }
>                       }
>                       /*
>                        * end additions
>                        */

Comment 1 David Lawrence 1998-11-30 19:42:59 UTC
This has been verified and has been this way since 5.0. It has been
assigned to a developer.

Comment 2 Bill Nottingham 1999-02-17 17:07:59 UTC
fixed in lpr-0.34-1