Bug 237 - lpd won't print if user is not local
Summary: lpd won't print if user is not local
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: lpr
Version: 5.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1998-11-30 18:39 UTC by rrd
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-02-17 17:07:30 UTC

Attachments (Terms of Use)

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

Note You need to log in before you can comment on or make changes to this bug.