# [Solved] cups stopped sharing my printer

## johnlu

Two days ago I used my printed connected to my server, it was discovered automatically by my desktop PC. Now suddenly, after a cups update the server side cups stopped sharing my printer. The printer is marked as shared in config file, but cups web service report it as not shared.

cupsd.conf

```
# Log general information in error_log - change "warn" to "debug"

# for troubleshooting...

LogLevel warn

# Administrator user group...

SystemGroup wheel

# Only listen for connections from the local machine.

Listen *:631

Listen /run/cups/cups.sock

# Show shared printers on the local network.

Browsing On

BrowseLocalProtocols

BrowseAllow @LOCAL

BrowseAddress @LOCAL

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

DefaultAuthType Basic

# Web interface setting...

WebInterface Yes

# Restrict access to the server...

<Location />

  Order allow,deny

  Allow 192.168.0.*

  Allow localhost

</Location>

# Restrict access to the admin pages...

<Location /admin>

  Order allow,deny

  Allow 192.168.0.*

  Allow localhost

</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/subscription privacy...

  JobPrivateAccess default

  JobPrivateValues default

  SubscriptionPrivateAccess default

  SubscriptionPrivateValues default

  # Job-related operations must be done by the owner or an administrator...

  <Limit Create-Job Print-Job Print-URI Validate-Job>

    Order deny,allow

  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set$

    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$

    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-Prin$

    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/subscription privacy...

  JobPrivateAccess default

  JobPrivateValues default

  SubscriptionPrivateAccess default

  SubscriptionPrivateValues default

  # Job-related operations must be done by the owner or an administrator...

  <Limit Create-Job Print-Job Print-URI Validate-Job>

    AuthType Default

    Order deny,allow

  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set$

    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$

    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-Prin$

    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>
```

----------

## dmpogo

now you need in addition to cupsd to run cups-browsed (if you you CUPS protocol rather than bonjour) and move some configuration related to browsing

to cups-browsed.conf

----------

## johnlu

Where do I have to do this? Sever side, client side...?

And, I think you didn't understood my problem or I didn't explain myself right. I mean that I configured my printer conected to my server as shared, but cupsd (as I read in cups web server in my server) reports that printer is not shared. I don't understand why.

Clients will never connect nor see this printer until I get it really shared by my server, I'm pretty sure about the problem is server side.

----------

## ulenrich

eselect news list

NN  2013-06-30  Printer browsing in net-print/cups-1.6

eselect news read NN

----------

## dmpogo

 *ulenrich wrote:*   

> eselect news list
> 
> NN  2013-06-30  Printer browsing in net-print/cups-1.6
> 
> eselect news read NN

 

which is, btw, not very informative.  It is not clear whether you should run cups-browsed on server or client side or both

----------

## ulenrich

The last sentence hints:

"Of course, directly specifying the location of your printers in

the cups interface works as well."

this is a client side issue?

And the advertised /etc/cups/cups-browsed.conf shows examples:

```
# BrowseAllow 192.168.1.12

# BrowseAllow 192.168.1.0/24

# BrowseAllow 192.168.1.0/255.255.255.0
```

I ever wonder people asking while their info shows at the same time:

N news unread

@dmpogo, if the would have read, they would ask:

It is unclear whether ....

I think it is unpolite to ask in the forum without exploiting the most basic info.Last edited by ulenrich on Sat Jul 20, 2013 2:16 pm; edited 1 time in total

----------

## dmpogo

 *ulenrich wrote:*   

> The last sentence hints:
> 
> "Of course, directly specifying the location of your printers in
> 
> the cups interface works as well."
> ...

 

Although the name 'browsed' hints that it is client side daemon, 

in my experience - it is a server side problem as well, that is, without cups-browsed running on server side there is no broadcast with CUPS protocol.

At least that is what happened on my home network.

I tried to ask a question what is now a minimal configuration in some of user cases I have

https://forums.gentoo.org/viewtopic-t-964392-highlight-.html

but, alas, got no replies, I guess it is trivial for everybody else  :Smile: 

----------

## johnlu

I'm not wasting my time on speaking about whether people are polite or unpolite only based on guessings about what they were supposed to do just before writing a post. But I can say this: I did read eselect news and this didn't help me at all (please don't make guessings about my lack of intelligence), I try to look for something similar to this on this forum, google and gentoo bugzilla and I got nothing, even I read that dmpogo's thread (please don't make any more guessings about my lack of habilities), I've been playing with USEs and cupsd/cups-browsed config files and I didn't get printer sharing to work (please, don't say anything about my lack of knowledge about Gentoo thing, this will make me cry).

The result today is that my server is not sharing my printer and me being judged as a such unpolite person and maybe a fool one too...

I hope polite and unpolite people can get together and help dmpogo and me to know how to make our cups server to share local printers in our nets.

Apologies about my unpoliteness.

Thakts to everybody.

----------

## johnlu

This is my server side cupsd error log:

```
W [21/Jul/2013:18:01:23 +0200] AddProfile failed: org.freedesktop.DBus.Error.UnknownMethod:No such interface `org.freedesktop.ColorManager' on object at path /org/freedesktop/ColorManager/devices/cups_hp_LaserJet_1010

W [21/Jul/2013:18:01:23 +0200] AddProfile failed: org.freedesktop.DBus.Error.UnknownMethod:No such interface `org.freedesktop.ColorManager' on object at path /org/freedesktop/ColorManager/devices/cups_hp_LaserJet_1010

```

----------

## johnlu

Thin one is my last server side cupsd.conf file:

```
# Log general information in error_log - change "warn" to "debug"

# for troubleshooting...

LogLevel warn

# Only listen for connections from the local machine.

Listen *:631

Listen /run/cups/cups.sock

# Show shared printers on the local network.

Browsing On

BrowseLocalProtocols

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

DefaultAuthType Basic

# Web interface setting...

WebInterface Yes

# Restrict access to the server...

<Location />

  Order allow,deny

  Allow 192.168.0.*

  Allow localhost

</Location>

# Restrict access to the admin pages...

<Location /admin>

  Order allow,deny

  Allow 192.168.0.*

  Allow localhost

</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/subscription privacy...

  JobPrivateAccess default

  JobPrivateValues default

  SubscriptionPrivateAccess default

  SubscriptionPrivateValues default

  # Job-related operations must be done by the owner or an administrator...

  <Limit Create-Job Print-Job Print-URI Validate-Job>

    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 Cancel-My-Jobs Close-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 Cancel-Jobs 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/subscription privacy...

  JobPrivateAccess default

  JobPrivateValues default

  SubscriptionPrivateAccess default

  SubscriptionPrivateValues default

  # Job-related operations must be done by the owner or an administrator...

  <Limit Create-Job Print-Job Print-URI Validate-Job>

    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 Cancel-My-Jobs Close-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 Cancel-Jobs 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>

```

This is my server side cups-browesd.conf file:

```
# Which protocols will we use to discover printers on the network?

# Can use DNSSD and/or CUPS, or 'none' for neither.

#BrowseRemoteProtocols DNSSD,CUPS

# Which protocols will we use to broadcast shared local printers to the network?

# Can use DNSSD and/or CUPS, or 'none' for neither.

# Only CUPS is actually supported, as DNSSD is done by CUPS itself (we ignore

# DNSSD in this directive).

# BrowseLocalProtocols none

BrowseLocalProtocols DNSSD,CUPS

# Settings of this directive apply to both BrowseRemoteProtocols and

# BrowseLocalProtocols.

# Can use DNSSD and/or CUPS, or 'none' for neither.

# BrowseProtocols none

# Only browse remote printers from selected servers

# BrowseAllow cups.example.com

# BrowseAllow 192.168.1.12

# BrowseAllow 192.168.1.0/24

# BrowseAllow 192.168.1.0/255.255.255.0

# Use BrowsePoll to poll a particular CUPS server

# BrowsePoll cups.example.com

# BrowsePoll cups.example.com:631

# Unknown directives are ignored, also unknown values.

```

This is my server side cups-files.conf file config:

```
# List of events that are considered fatal errors for the scheduler...

#FatalErrors config

# Default user and group for filters/backends/helper programs; this cannot be

# any user or group that resolves to ID 0 for security reasons...

User lp

Group lp

# Administrator user group, used to match @SYSTEM in cupsd.conf policy rules...

SystemGroup lpadmin

# User that is substituted for unauthenticated (remote) root accesses...

#RemoteRoot remroot

# Do we allow file: device URIs other than to /dev/null?

#FileDevice No

# Permissions for configuration and log files...

#ConfigFilePerm 0640

#LogFilePerm 0644

# Location of the file logging all access to the scheduler; may be the name

# "syslog". If not an absolute path, the value of ServerRoot is used as the

# root directory.  Also see the "AccessLogLevel" directive in cupsd.conf.

AccessLog /var/log/cups/access_log

# Location of cache files used by the scheduler...

#CacheDir /var/cache/cups

# Location of data files used by the scheduler...

#DataDir /usr/share/cups

# Location of the static web content served by the scheduler...

#DocumentRoot /usr/share/cups/html

# Location of the file logging all messages produced by the scheduler and any

# helper programs; may be the name "syslog". If not an absolute path, the value

# of ServerRoot is used as the root directory.  Also see the "LogLevel"

# directive in cupsd.conf.

ErrorLog /var/log/cups/error_log

# Location of fonts used by older print filters...

#FontPath /usr/share/cups/fonts

# Location of LPD configuration

#LPDConfigFile xinetd:///etc/xinetd.d/cups-lpd

# Location of the file logging all pages printed by the scheduler and any

# helper programs; may be the name "syslog". If not an absolute path, the value

# of ServerRoot is used as the root directory.  Also see the "PageLogFormat"

# directive in cupsd.conf.

PageLog /var/log/cups/page_log

# Location of the file listing all of the local printers...

#Printcap /etc/printcap

# Format of the Printcap file...

#PrintcapFormat bsd

#PrintcapFormat plist

#PrintcapFormat solaris

# Location of all spool files...

#RequestRoot /var/spool/cups

# Location of helper programs...

#ServerBin /usr/lib/cups

# SSL/TLS certificate for the scheduler...

#ServerCertificate ssl/server.crt

# SSL/TLS private key for the scheduler...

#ServerKey ssl/server.key

# Location of other configuration files...

#ServerRoot /etc/cups

# Location of Samba configuration file...

#SMBConfigFile 

# Location of scheduler state files...

#StateDir /run/cups

# Location of scheduler/helper temporary files. This directory is emptied on

# scheduler startup and cannot be one of the standard (public) temporary

# directory locations for security reasons...

#TempDir /var/spool/cups/tmp

```

----------

## dmpogo

 *johnlu wrote:*   

> This is my server side cupsd error log:
> 
> ```
> W [21/Jul/2013:18:01:23 +0200] AddProfile failed: org.freedesktop.DBus.Error.UnknownMethod:No such interface `org.freedesktop.ColorManager' on object at path /org/freedesktop/ColorManager/devices/cups_hp_LaserJet_1010
> 
> ...

 

That by the way points to you having some different error, not just cups-browsed issue.   In principle, with all the changes, 

 locally on the server   everything is supposed to work as before, without any configuration change.  It is communication outside of the server

that requires extra steps.  Now it looks that even locally on the server cupsd gives errors ?Last edited by dmpogo on Sun Jul 21, 2013 6:16 pm; edited 1 time in total

----------

## ulenrich

@JohnLu, please excuse me calling you unpolite, I take it back

? Have you activated the service /etc/init.d/cups-browsed

? Have you played with /etc/cups/cups-browsed.conf

(I see you activated BrowseLocalProtocols DNSSD despite it is announced as ignored)

? Why not activate

BrowseAllow 192.168.1.0/255.255.255.0

? Will such in /etc/cups/cupsd.conf take effect

Browsing On

BrowseLocalProtocols

Or are they obsolete now ... I don't know

But at first I would search direction colord service,

what dmpogo saw ...

----------

## johnlu

 *ulenrich wrote:*   

> @JohnLu, please excuse me calling you unpolite, I take it back

 

Don't worry friend. I really appreciate your time and effort to try to help me  :Smile: 

 *ulenrich wrote:*   

> ? Have you activated the service /etc/init.d/cups-browsed

 

Yes, I have.

 *ulenrich wrote:*   

> ? Have you played with /etc/cups/cups-browsed.conf

 

Yes, I have.

 *ulenrich wrote:*   

> (I see you activated BrowseLocalProtocols DNSSD despite it is announced as ignored)
> 
> ? Why not activate

 

I changed it to BrowseLocalProtocols CUPS, despite I think this is unrelevant. This seems to make no difference.

 *ulenrich wrote:*   

> BrowseAllow 192.168.1.0/255.255.255.0

 

It is supposed to not changed this in server side as printer is not remote, it is connected locally via USB port.

Anyways I had this in cups-browsed.conf client side "BrowseAllow 192.168.0.0/24", no effect as expected.

 *ulenrich wrote:*   

> ? Will such in /etc/cups/cupsd.conf take effect
> 
> Browsing On
> 
> BrowseLocalProtocols
> ...

 

I'm not really sure about it, but there are no messages about anything about this in logs...

 *ulenrich wrote:*   

> But at first I would search direction colord service,
> 
> what dmpogo saw ...

 

I had installed colord for this but it's still giving error messages, I don't know how to make this to dessapear at the moment, but, I think this won't make the differenc neither...

----------

## dmpogo

Could we try to do it step-by-step

If you login on printer service, start just cupsd and look at the queues ( lpstat -a ), do you see all printers you expect configured ?

----------

## johnlu

```
# lpstat -a

hp_LaserJet_1010 accepting requests since Wed 27 Feb 2013 11:10:27 AM CET
```

Even I can print from server side a trial page. The thing is that my cupsd is not sharing the printer.

Look: http://www.juanluperez.com/~johnlu/printer.png

----------

## dmpogo

 *johnlu wrote:*   

> 
> 
> ```
> # lpstat -a
> 
> ...

 

Set in /etc/cups-browsed.conf    

BrowseProtocols CUPS, DNSSD

does it help ?

----------

## johnlu

dmpogo, no, it doesn't...  :Sad: 

----------

## dmpogo

 *johnlu wrote:*   

> dmpogo, no, it doesn't... 

 

What is in your cups-browsed on client side ?

----------

## johnlu

cusp-browsed.conf client side:

```
# Which protocols will we use to discover printers on the network?

# Can use DNSSD and/or CUPS, or 'none' for neither.

BrowseRemoteProtocols DNSSD,CUPS

# Which protocols will we use to broadcast shared local printers to the network?

# Can use DNSSD and/or CUPS, or 'none' for neither.

# Only CUPS is actually supported, as DNSSD is done by CUPS itself (we ignore

# DNSSD in this directive).

# BrowseLocalProtocols none

# Settings of this directive apply to both BrowseRemoteProtocols and

# BrowseLocalProtocols.

# Can use DNSSD and/or CUPS, or 'none' for neither.

# BrowseProtocols none

# Only browse remote printers from selected servers

# BrowseAllow cups.example.com

# BrowseAllow 192.168.0.128

BrowseAllow 192.168.0.0/24

# BrowseAllow 192.168.1.0/255.255.255.0

# Use BrowsePoll to poll a particular CUPS server

# BrowsePoll cups.example.com

# BrowsePoll cups.example.com:631

# Unknown directives are ignored, also unknown values.

```

Remember printer is reported as not shared server side, so it will not be shown never on my clients!!!

----------

## johnlu

Solved!!

After editing /etc/cups/cups-client.conf and adding my users to lp and lpadming group and relogin with my user, it started to work.

Thanks friends!

----------

