LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2013, 03:38 PM   #1
majedian21
LQ Newbie
 
Registered: Apr 2013
Distribution: CentOS 6
Posts: 2

Rep: Reputation: Disabled
CentOS CUPS Server Not Reporting True Owner of Print Job


Greetings, thanks in advance for reading this question.

Server:
Flavor: CentOS 6.3 (2.6.32-358.2.1.el6.x86_64)
CUPS version: 1.4.2

Client:
Mac OS X 10.7.4
CUPS version: 1.5.3

I have a printer defined on the CUPS server with:
Name: ITOfficeQ
Driver: Generic PostScript Printer
socket://10.10.200.22:9100

On the Mac client it is defined to use LDP
Name: IT_Office_TEST
Driver: HP LaserJet P2015 Series
lpd://cups-server.company.com/ITOfficeQ

I have cup-ldp installed and listening on port 515 on the server, so printing seems to be working normally, except for one thing. Any job created on the client is created with the job's owner as the true owner (ex: 'majedian'). However, the server accepts the job and thinks that the owner is 'lp' user.

Sample from client's error_log:
Code:
I [19/Apr/2013:14:23:42 -0500] [Job 78] Queued on "IT_Office_TEST" by "majedian".
D [19/Apr/2013:14:23:42 -0500] Returning IPP successful-ok for Create-Job (ipp://localhost:631/printers/IT_Office_TEST) from localhost
Sample from server's error_log:
Code:
D [19/Apr/2013:14:56:29 -0500] cupsdSetBusyState: Active clients
D [19/Apr/2013:14:56:29 -0500] cupsdAuthorize: Authorized as lp using PeerCred
D [19/Apr/2013:14:56:29 -0500] cupsdIsAuthorized: username="lp"
The same is true on the web interface for both the client and server, each respectively showing 'majedian' or 'lp' user as the owner of the print jobs.

Not sure if this is a Mac client issue or a Linux server issue - any assistance would be appreciated.
Again, pages appear to print fine, but we need to know the actual username on the server side for reporting purposes.

cupsd.conf
Code:
MaxLogSize 0 
#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel debug

# Administrator user group...
#SystemGroup sys root lp ptradmin ptroper
SystemGroup sys root ptradmin ptroper

# Don't ever use SSL encryption
DefaultEncryption Never

Listen *:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing Off 
#Browsing On 
#BrowseOrder allow,deny
#BrowseAllow all
#BrowseLocalProtocols CUPS

# Amount of seconds to wait before timing out a request (default is 300)
#Timeout 90

# Server admin email
ServerAdmin admin@mycompany.com

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Default print job error policy (default is stop-job)
ErrorPolicy retry-job
# Wait this many seconds and then retry the job (default is 30)
JobRetryInterval 5
# Retry this many times before giving up (default is 5)
#JobRetryLimit 5

# Only this many number of connections from a single IP
# (default = MaxClients field, which is default 100)
MaxClients 500
MaxClientsPerHost 100

# Max number of copies any user can do (default is 9999)
MaxCopies 500

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow from 10.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  AuthType Default
  Require user @ptradmin
  Order allow,deny
  Allow from 10.*
</Location>

# Restrict access to printers...
<Location /printers>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow from 10.*
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order allow,deny
    Allow from 10.*
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @ptradmin
    Order allow,deny
    Allow from 10.*
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order allow,deny
    Allow from 10.*
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order allow,deny
    Allow from 10.*
  </Limit>

  <Limit All>
    Order allow,deny
    Allow from 10.*
  </Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    AuthType Default
    Order deny,allow
  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

Thanks!

Last edited by majedian21; 04-19-2013 at 03:41 PM. Reason: Removed company information
 
Old 04-25-2013, 08:04 AM   #2
majedian21
LQ Newbie
 
Registered: Apr 2013
Distribution: CentOS 6
Posts: 2

Original Poster
Rep: Reputation: Disabled
Unfortunately, no updates on my end on how to fix this with LPD. However, I did manage to get this functionality (passing the real username to the CUPS server) after defining the client printer config as IPP (not LPD). Of course, that meant that port 515 could be closed again. If anyone still does have any reason why LPD wasn't working as described, I'd be curious to hear it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] CUPS - job completed, but no print out on the printer? pielas Linux - Hardware 12 07-11-2017 02:34 PM
[SOLVED] Cups and Samba to print one print job to 2 printers - tutorial added bourne Linux - General 7 09-18-2009 10:10 AM
Clearing CUPS print job? Jonah86 Linux - Newbie 2 05-24-2004 02:11 PM
Why does CUPS print after 15 seconds whether the job is ready or not? Izzard Linux - General 2 12-11-2003 03:36 AM
samba/cups print job size carpman Linux - Networking 1 01-25-2002 05:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration