Re: [Hampshire] Sharing printers with OS X from CUPS

Top Page

Reply to this message
Author: Benjie Gillam
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Sharing printers with OS X from CUPS
Here's your issue:

# Only listen for connections from the local machine.
Listen localhost:631

Change it to:

Listen 192.168.0.X:631

Where X completes your (hopefully fixed?) LAN IP address.

Cheers,

Benjie.

On 18 May 2011 22:11, Robin Wilson <robin@???> wrote:

> Hi all,
>
> Is there anyone on this list with particular experience in sharing printers
> from CUPS, particularly with OS X machines but also to Windows clients? I'm
> trying to set up printer sharing on my home server, and it isn't going very
> well. I've got printing working fine on the server itself, but I can't seem
> to access the printer from anywhere else. I'm not entirely sure what to
> check, and the various guides on the internet all seem to say different
> things - and the things they do say don't seem to help hugely.
>
> I've pasted the relevant sections of various config files below:
>
> /etc/samba/smb.conf:
>
> ########## Printing ##########
>
> # If you want to automatically load your printer list rather
> # than setting them up individually then you'll need this
> load printers = yes
>
> # lpr(ng) printing. You may wish to override the location of the
> # printcap file
> ; printing = bsd
> ; printcap name = /etc/printcap
>
> # CUPS printing. See also the cupsaddsmb(8) manpage in the
> # cupsys-client package.
> printing = cups
> printcap name = cups
>
> and
>
> [printers]
> comment = All Printers
> browseable = yes
> path = /var/spool/samba
> use client driver = yes
> printable = yes
> guest ok = no
> read only = yes
> create mask = 0700
>
> [ColourLaser]
> comment = ColourLaser
> browseable = yes
> printable = yes
> path = /var/spool/samba
> public = yes
> guest ok = yes
> printer admin = printer_username,root
>
> # Windows clients look for this share name as a source of downloadable
> # printer drivers
> [print$]
> comment = Printer Drivers
> path = /var/lib/samba/printers
> browseable = yes
> read only = yes
> guest ok = no
>
>
> /etc/cups/cupsd.conf:
>
> # Log general information in error_log - change "warn" to "debug"
> # for troubleshooting...
> LogLevel warn
>
> # Deactivate CUPS' internal logrotating, as we provide a better one,
> especially
> # LogLevel debug2 gets usable now
> MaxLogSize 0
>
> # Administrator user group...
> SystemGroup lpadmin
>
>
> # Only listen for connections from the local machine.
> Listen localhost:631
> Listen /var/run/cups/cups.sock
>
> # Show shared printers on the local network.
> Browsing On
> BrowseOrder allow,deny
> BrowseAllow all
> BrowseLocalProtocols CUPS dnssd
>
> # Default authentication type, when authentication is required...
> DefaultAuthType Basic
>
> # Restrict access to the server...
> <Location />
> Order deny,allow
> Deny from all
> Allow From 192.168.0.*
> </Location>
>
> # Restrict access to the admin pages...
> <Location /admin>
> Order deny,allow
> AuthType Basic
> AuthClass System
> Allow From 192.168.0.*
>
> </Location>
>
> # Restrict access to configuration files...
> <Location /admin/conf>
> AuthType Default
> Require user @SYSTEM
> Order allow,deny
> </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 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 CUPS-Get-Devices>
>    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>
>    Require user @OWNER @SYSTEM
>    Order deny,allow
>  </Limit>

>
>  <Limit All>
>    Order deny,allow
>  </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>

>
>
> <Location /printers>
> AuthType None
> Order Deny,Allow
> Deny From None
> Allow From All
> </Location>
> #
> #
>
> (Sorry for the length - I wasn't sure which bits of cupsd.conf were
> relevant, so I put them all in).
>
> Cheers,
>
> Robin
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------
>