[cups] Setup cups and Brother HL-4150CDN on FreeBSD 10

Helge Blischke HelgeBlischke at web.de
Mon Jun 9 13:56:23 PDT 2014


The error message
E [08/Jun/2014:17:37:53 +0200] [Client 15] Invalid peer credentials  
for "root" - got 8, expected 0!
states that the efective user id cupsd is runnin under is 8, which  
certainly is not root.
Make sure your cupsd is running as root.
(see scheduler/auth.c in your sources directory tree).

Helge

Am 09.06.2014 um 19:38 schrieb Willy Offermans:

> Hello Chris and cups, and freebsd friends,
>
> On Mon, Jun 09, 2014 at 07:20:09AM -0700, Chris H wrote:
>> Greetings...
>>> Dear cups and freebsd friends,
>>>
>>> I'm trying to setup CUPS on FreeBSD 10. I managed to install the  
>>> software
>>> and I managed to make the printer available to the OS via /dev/ 
>>> ulpt0:
>>>
>>> from messages:
>>> <snip>
>>> ...
>>> Jun  8 17:16:13 donald kernel: ugen1.2: <Brother> at usbus1
>>> Jun  8 17:16:13 donald kernel: ulpt0: <Brother HL-4150CDN series,  
>>> class 0/0, rev 2.00/1.00,
>>> addr 1> on usbus1
>>> Jun  8 17:16:13 donald kernel: ulpt0: using bi-directional mode
>>> Jun  8 17:16:13 donald kernel: ulpt0: offline
>>> ...
>>> </snip>
>>>
>>> from ll /dev/ulpt0
>>>
>>> crw-rw----  1 root  cups  - 0x65 Jun  8 17:16 /dev/ulpt0
>>>
>>> If I executed the following command:
>>>
>>> echo 'true' > /dev/ulpt0
>>>
>>> then the printer reacts and shows that data is transferred to the  
>>> printer.
>>>
>>> However, if I try to add the printer to CUPS via the web- 
>>> interface, then
>>> the printer is not detectable. I would expect the printer to be  
>>> found after
>>> searching. I can find an error message in error_log:
>>>
>>> <snip>
>>> ...
>>> E [08/Jun/2014:17:37:53 +0200] [Client 15] Invalid peer  
>>> credentials for "root" - got 8,
>>> expected 0!
>>> ...
>>> </snip>
>>>
>>> I'm not sure if this is related to the fact that the printer  
>>> cannot be
>>> detected.
>>>
>>> If I add the printer manually to the printer.conf file:
>>>
>>> </Printer>
>>> <Printer BHL4150CDN_2>
>>> UUID urn:uuid:de11cfc5-3cbd-361e-5750-8b0e3f0ff4ad
>>> AuthInfoRequired none
>>> Info Brother HL-4150CDN series
>>> Location attic
>>> MakeModel Brother HL-4150CDN series CUPS
>>> DeviceURI usb:/dev/ulpt0
>>> State Idle
>>> StateTime 1402241099
>>> Type 8392780
>>> Accepting Yes
>>> Shared No
>>> JobSheets none none
>>> QuotaPeriod 0
>>> PageLimit 0
>>> KLimit 0
>>> OpPolicy default
>>> ErrorPolicy stop-printer
>>> </Printer>
>>>
>>> then I still cannot print to the printer.
>>>
>>> Does anyone has a clue what is going on? Or how can I debug this  
>>> problem?
>>>
>> It appears that the user under which you are attempting all this,
>> doesn't have permission to manage, or otherwise manipulate/view the
>> printer facilities. My suggestion would be to (if available) go to
>> http://localhost:631/admin in your browser, and login with the root
>> password, and then GRANT permission(s) to the user you want to give
>> access to.
>>
>> Also insure that the cups user/group were added correctly.
>>
>> Best wishes.
>>
>> --Chris
>>>
>>> --
>
> I did as you told. I logged in with root account, but there were no
> printers available. Also the /dev/ulpt0 device cannot be detected,  
> although
> the local printer is connected to this device. <find new printer>  
> under
> administration is not successful. No printer will appear.
>
> I will just add the output from error_log file, though I cannot find  
> any
> obvious irregularity:
>
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 14] POST /admin/ HTTP/1.1
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Active  
> clients", busy="Not busy"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] No authentication data  
> provided.
> D [09/Jun/2014:19:27:13 +0200] [Client 14] 2.0 CUPS-Add-Modify- 
> Printer 4154
> D [09/Jun/2014:19:27:13 +0200] CUPS-Add-Modify-Printer ipp:// 
> localhost:631/printers/BHL4150CDN at xxx.xxx.xxx.xxx
> D [09/Jun/2014:19:27:13 +0200] cupsdIsAuthorized: username=""
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Returning HTTP  
> Unauthorized for CUPS-Add-Modify-Printer (ipp://localhost:631/ 
> printers/BHL4150CDN@ xxx.xxx.xxx.xxx) from localhost
> D [09/Jun/2014:19:27:13 +0200] [Client 14] WWW-Authenticate: Basic  
> realm="CUPS", trc="y"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Active clients"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 14] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Not busy"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 16] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Not busy"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] POST /admin/ HTTP/1.1
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Active  
> clients", busy="Not busy"
> E [09/Jun/2014:19:27:13 +0200] [Client 14] Invalid peer credentials  
> for "root" - got 8, expected 0!
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_version=0
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_uid=8
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_ngroups=1760
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_groups[0]=32767
> D [09/Jun/2014:19:27:13 +0200] [Client 14] 2.0 CUPS-Add-Modify- 
> Printer 4154
> D [09/Jun/2014:19:27:13 +0200] CUPS-Add-Modify-Printer ipp:// 
> localhost:631/printers/BHL4150CDN at xxx.xxx.xxx.xxx
> D [09/Jun/2014:19:27:13 +0200] cupsdIsAuthorized: username=""
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Returning HTTP  
> Unauthorized for CUPS-Add-Modify-Printer (ipp://localhost:631/printers/BHL4150CDN@xxx.xxx.xxx.xxx 
> ) from localhost
> D [09/Jun/2014:19:27:13 +0200] [Client 14] WWW-Authenticate: Basic  
> realm="CUPS", trc="y"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Active clients"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 14] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Not busy"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 16] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Not busy"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] POST /admin/ HTTP/1.1
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Active  
> clients", busy="Not busy"
> E [09/Jun/2014:19:27:13 +0200] [Client 14] Invalid peer credentials  
> for "root" - got 8, expected 0!
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_version=0
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_uid=8
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_ngroups=1760
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_groups[0]=32767
> D [09/Jun/2014:19:27:13 +0200] [Client 14] 2.0 CUPS-Add-Modify- 
> Printer 4154
> D [09/Jun/2014:19:27:13 +0200] CUPS-Add-Modify-Printer ipp:// 
> localhost:631/printers/BHL4150CDN at xxx.xxx.xxx.xxx
> D [09/Jun/2014:19:27:13 +0200] cupsdIsAuthorized: username=""
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Returning HTTP  
> Unauthorized for CUPS-Add-Modify-Printer (ipp://localhost:631/printers/BHL4150CDN@xxx.xxx.xxx.xxx 
> ) from localhost
> D [09/Jun/2014:19:27:13 +0200] [Client 14] WWW-Authenticate: Basic  
> realm="CUPS", trc="y"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Active clients"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 14] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Not busy"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Accepted from localhost  
> (Domain)
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Waiting for request.
> D [09/Jun/2014:19:27:13 +0200] [Client 16] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 16] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Not busy"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] POST /admin/ HTTP/1.1
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Active  
> clients", busy="Not busy"
> E [09/Jun/2014:19:27:13 +0200] [Client 14] Invalid peer credentials  
> for "root" - got 8, expected 0!
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_version=0
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_uid=8
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_ngroups=1760
> D [09/Jun/2014:19:27:13 +0200] [Client 14] cr_groups[0]=32767
> D [09/Jun/2014:19:27:13 +0200] [Client 14] 2.0 CUPS-Add-Modify- 
> Printer 4154
> D [09/Jun/2014:19:27:13 +0200] CUPS-Add-Modify-Printer ipp:// 
> localhost:631/printers/BHL4150CDN at xxx.xxx.xxx.xxx
> D [09/Jun/2014:19:27:13 +0200] cupsdIsAuthorized: username=""
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Returning HTTP  
> Unauthorized for CUPS-Add-Modify-Printer (ipp://localhost:631/printers/BHL4150CDN@xxx.xxx.xxx.xxx 
> ) from localhost
> D [09/Jun/2014:19:27:13 +0200] [Client 14] WWW-Authenticate: Basic  
> realm="CUPS", trc="y"
> D [09/Jun/2014:19:27:13 +0200] [Client 14] HTTP_STATE_WAITING  
> Closing on EOF
> D [09/Jun/2014:19:27:13 +0200] [Client 14] Closing connection.
> D [09/Jun/2014:19:27:13 +0200] cupsdSetBusyState: newbusy="Not  
> busy", busy="Active clients"
>
>
>
>
>
>
> -- 
> Met vriendelijke groeten,
> With kind regards,
> Mit freundlichen Gruessen,
> De jrus wah,
>
> Wiel
>
> *************************************
> W.K. Offermans
> Home:   +31 45 544 49 44
> Mobile: +31 681 15 87 68
> Mobile: +49 1575 414 60 55
> e-mail: Willy at Offermans.Rompen.nl
>
>                                       Powered by ....
>
>                                            (__)
>                                         \\\'',)
>                                           \/  \ ^
>                                           .\._/_)
>
>                                       www.FreeBSD.org
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups




More information about the cups mailing list