cups ldap

Bernd Krumböck b.krumboeck at rewe-group.at
Thu Apr 10 13:25:22 PDT 2008


> Trying to get cups to bind to LDAP to find a list of printers available, from which jobs can be sent to.
>
> First off, is this even supported?

You don't want to use browsing?

Alternate way:
Write a script/programm which do the ldap search and call lpadmin for all changed printers.


> Secondly, here is my ldap config:
>
> BrowseLDAPServer ldap://servername:3268
> BrowseLDAPDN cn=noc-clbfp1, ou=fp, ou=servers, ou=clb, dc=clubs, dc=domainname, dc=com
> BrowseLDAPBindDN ldap_proxy
> BrowseLDAPPassword password
>
> When I start cups everything appears to be fine, when I try to search for printers I get the following:
>
> E [10/Apr/2008:10:14:22 -0700] LDAP search returned error -1: Can't contact LDAP server
> E [10/Apr/2008:10:15:12 -0700] LDAP search returned error -1: Can't contact LDAP server
> E [10/Apr/2008:10:19:20 -0700] LDAP search returned error -1: Can't contact LDAP server


This can happen if cups has lost the ldap connection. Restart the cups daemon and the check the logfile again.

You can find an improved LDAP implementation here:
http://www.cups.org/str.php?L1962
(read at least the last three posts)

But this is only beta and will not be included until cups 1.4.x. You can experiment on your own risk.


>
> When I start cups I see the following:
>
> d [10/Apr/2008:10:14:10 -0700] UpdateLDAPBrowse: oats.domainname.com
> d [10/Apr/2008:10:14:10 -0700] LDAP search returned 0 entries
> D [10/Apr/2008:10:14:10 -0700] Report: clients=0
> D [10/Apr/2008:10:14:10 -0700] Report: jobs=0
> D [10/Apr/2008:10:14:10 -0700] Report: jobs-active=0
> D [10/Apr/2008:10:14:10 -0700] Report: printers=0
> D [10/Apr/2008:10:14:10 -0700] Report: printers-implicit=0
> D [10/Apr/2008:10:14:10 -0700] Report: stringpool-string-count=172
> D [10/Apr/2008:10:14:10 -0700] Report: stringpool-alloc-bytes=5064
> D [10/Apr/2008:10:14:10 -0700] Report: stringpool-total-bytes=3792
> d [10/Apr/2008:10:14:10 -0700] select_timeout(0): 86400 seconds to do nothing
> d [10/Apr/2008:10:14:10 -0700] cupsdDoSelect: polling 3 fds for 86400 seconds...
> d [10/Apr/2008:10:14:22 -0700] cupsdDoSelect: epoll() returned 1...
> d [10/Apr/2008:10:14:22 -0700] cupsdDoSelect: Read on fd 1...
> d [10/Apr/2008:10:14:22 -0700] cupsdAcceptClient(lis=0x86081f8) 1 Clients = 0
> D [10/Apr/2008:10:14:22 -0700] cupsdAcceptClient: 8 from 10.1.16.141:631 (IPv4)
> d [10/Apr/2008:10:14:22 -0700] cupsdAcceptClient: 8 connected to server on oats.domainname.com:631
> d [10/Apr/2008:10:14:22 -0700] cupsdAddSelect: fd=8, read_cb=0x8058190, write_cb=(nil), data=0x861f778
>
> We are using cups-1.3.6-1 on RHEL 4u6.
>
> I am not really sure if what we are trying to do is what the ldap directives where intended for. But we set BrowseRemoteProtocols to ldap and disabled everything else to force Cups to look to the directory service for printers. We don't want to register local printers, just connect to remote printers.
>
> BTW: The remote print servers are on an Active Directory domain, so we are defining the print server that controls all of the printers. If we attach the printer via an smb:// ldap connection in the cups printers.conf it works fine, but remote browsing seems to break.
>
> Thoughts?
>
> -Wes

What do you mean with just connect to the remote printer?
Did mean a remote ipp printer queue (e.g. CUPS server), a "typical" network printer or a smb share?

regards!
Bernd





More information about the cups mailing list