# samba and cups not speaking to each other

## Moriah

After a routine update, my windoze users can no longer print to cups managed printers.  Cups still works fine for linux boxes, but it seems like samba and cups are no longer on speaking terms.    :Evil or Very Mad: 

When I restart samba, I get the following in /var/log/samba/log.smbd:

```

[2009/09/20 20:04:08, 0] smbd/server.c:main(944)

  smbd version 3.0.33 started.

  Copyright Andrew Tridgell and the Samba Team 1992-2008

[2009/09/20 20:04:08, 1] param/loadparm.c:lp_do_parameter(3533)

  WARNING: The "printer admin" option is deprecated

[2009/09/20 20:04:08, 1] param/loadparm.c:lp_do_parameter(3533)

  WARNING: The "printer admin" option is deprecated

[2009/09/20 20:04:08, 1] param/loadparm.c:lp_do_parameter(3533)

  WARNING: The "printer admin" option is deprecated

[2009/09/20 20:04:08, 0] printing/print_cups.c:cups_connect(69)

  Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory

[2009/09/20 20:04:08, 0] printing/print_cups.c:cups_connect(69)

  Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No such file or directory

```

When I restart cups, I get the following in /var/log/cups/error_log:

```

D [20/Sep/2009:20:07:04 -0400] [Job 3465] Loading from cache...

I [20/Sep/2009:20:07:04 -0400] Full reload complete.

I [20/Sep/2009:20:07:04 -0400] Cleaning out old temporary files in "/var/spool/cups/tmp"...

I [20/Sep/2009:20:07:04 -0400] Listening to 0.0.0.0:631 on fd 1...

E [20/Sep/2009:20:07:04 -0400] Unable to open listen socket for address :::631 - Address family not supported by protocol.

I [20/Sep/2009:20:07:04 -0400] Resuming new connection processing...

```

I am still able to connect to the cups web server using https on port 631.

Does anyone know what is going on here?  This used to work just fine -- for *YEARS*.  Now it is broken by an update.    :Crying or Very sad: 

----------

## linear

In your /etc/cups/cupsd.conf, what do you have listed for your 'Listen' configurations?  From the output, it looks like you have:

```
Listen 0.0.0.0:631

Listen :::631
```

Have you tried setting it to 'Listen 192.168.xxx.xxx:631' where the "192.168.xxx.xxx" is the IP address of your CUPS server?

HTH.

----------

## Moriah

Here is what was in my /etc/cups/cupsd.conf file (by default):

```

#

# Ports/addresses that we listen to.  The default port 631 is reserved

# for the Internet Printing Protocol (IPP) and is what we use here.

#

# You can have multiple Port/Listen lines to listen to more than one

# port or address, or to restrict access:

#

#    Port 80

#    Port 631

#    Listen hostname

#    Listen hostname:80

#    Listen hostname:631

#    Listen 1.2.3.4

#    Listen 1.2.3.4:631

# 

# NOTE: Unfortunately, most web browsers don't support TLS or HTTP Upgrades

# for encryption.  If you want to support web-based encryption you'll

# probably need to listen on port 443 (the "https" port...)

#

# NOTE 2: In order for the command-line and web interfaces to work, you

# must have at least one Port or Listen line that allows access from the

# local loopback address (localhost).

#

#Port 80

#Port 443

Port 631

```

Please note that samba and cups are both running on the same machine, so I do not see why the socket was not found/opened.

Also, the web interface does work, and I use https on port 631.  Obviously, this is restricted to my intranet lan.

Given what I have, should I still add the Listen 192.168.xxx.xxx:631 as you suggested?

----------

## linear

I would recommend putting something in there, definitely.

As an example, this is what I have in my /etc/cups/cupsd.conf on my system here that works well:

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

HTH.

----------

## marckn

I had the same problem with winzoz clients. 

It turned out that in my cupsd.conf was missing the line

```

Listen /var/run/cups/cups.sock

```

Now it's working fine, though I feel I've lost too much time for windows   :Wink: 

----------

