Bug 53029 - There is no authentication function when printing using CUPS on the network with LibreOffice Dialogs
Summary: There is no authentication function when printing using CUPS on the network w...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.3.0 target:6.2.4
Keywords:
: 48414 114590 (view as bug list)
Depends on:
Blocks: Network Print
  Show dependency treegraph
 
Reported: 2012-08-01 08:20 UTC by Vladimir
Modified: 2019-04-12 12:03 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:


Attachments
something along these line, if I can figure out the right way to transmit the username+password to cups (7.31 KB, patch)
2014-08-14 15:40 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir 2012-08-01 08:20:36 UTC
There is no authentication function when printing using CUPS on the network (such as localhost: 631) while in OOo (version 1.2) is a pop-up window requesting user name and password.
Comment 1 Martin Pitt 2012-08-01 20:33:22 UTC
cups usually does not require authentication when talking to a local printer, it uses the socket cookie. This is not related to ConsoleKit at all; if cups is misbehaving, please report a bug against cups.

Thanks,

Martin
Comment 2 Vladimir 2012-08-13 12:38:26 UTC
Excuse me but the LibreOffice has this error nevertheless.
When both the network printer and CUPS configured and worked on other computer and if somebody wish print some documents from any applications authentication is needed. Before printing applications should open the necessary window so that users have possibility to enter one's name and password. OpenOffice knew to make it. Unfortunately, we guess this source code was erased from LibreOffice when this project was forked from OepOffice.org.
Comment 3 Thijs Kinkhorst 2013-02-15 12:09:13 UTC
I'm unsure if this report was filed against the right component, feel free to reassign. The issue is real, though.

The problem arises when printing to a network printer, e.g. over IPP, that requires a username/password combination. We have such printers in our enterprise environment. They are configured in my local CUPS printers.conf with the "AuthInfoRequired username,password" option.

This works fine with Gnome programs and Firefox, but LibreOffice doesn't request any credentials from the user and printing fails.
Comment 4 Dennis Schridde 2013-06-20 10:55:22 UTC
Is this a duplicate of bug #48414?
Comment 5 Sam Morris 2013-06-20 11:49:04 UTC
(In reply to comment #4)
> Is this a duplicate of bug #48414?

I think so. My understanding of the original report is:

 * There is no way to authenticate when printing using CUPS on the network [to a printer with AuthInfoRequired username,password in its printers.conf entry]

 * Whereas, in OpenOffice.org 1.2, there is a pop-up window requesting authentication [when attempting to print to such a printer]
Comment 6 Thijs Kinkhorst 2013-06-20 11:55:45 UTC
*** Bug 48414 has been marked as a duplicate of this bug. ***
Comment 7 Thijs Kinkhorst 2013-06-20 11:57:19 UTC
Yes, it's the same issue. For example Evince, Firefox and OpenOffice will have an authentication popup, LibreOffice lacks this functionality which makes the printing fail.
Comment 8 Caolán McNamara 2014-08-12 15:39:49 UTC
We do set a password handler via cupsSetPasswordCB which I imagine is what should then get called under these circumstances, but it doesn't work for me either while it does in evince.

Odd
Comment 9 Caolán McNamara 2014-08-13 13:14:50 UTC
Apparently we need to search for auth-info-required in the cups attributes and set auto-info on the job. afaik we never did this and either OOo 1.2 doesn't/didnt work, or worked for some unrelated reason
Comment 10 Caolán McNamara 2014-08-14 15:40:07 UTC
Created attachment 104625 [details]
something along these line, if I can figure out the right way to transmit the username+password to cups
Comment 12 V Stuart Foote 2014-11-04 19:32:02 UTC
Adolfo, Caolán, *

Setting back to NEW. I could be wrong butI don't believe the commit listed (from bug 84757) is actually against this CUPS authentication issue--although it was annotated such in gerrit review, removed the whiteboard notation.

Stuart
Comment 13 Matthew Sainsbury 2015-04-06 11:03:40 UTC
I've found a workaround - you can set LibreOffice to use the system's native print dialog.

Steps:

- Navigate to Tools -> Options -> LibreOffice -> Advanced.
- Check "Enable experimental features"
- Change to LibreOffice -> General tab
- Under heading "Print dialogs", Uncheck "Use LibreOffice Dialogs"

I hope this provides some relief to users who have been waiting a long time for a fix
Comment 14 Drew Parsons 2016-10-04 04:43:34 UTC
The workaround of using native print dialogs fails on Gnome 3.22 (Debian unstable), where it crashes OOo 5.2.2 with warnings (see Debian bug#839701):
  GLib-GObject-CRITICAL **: g_object_new_valist: invalid unclassed object pointer for value type 'GtkPrinter'
  Gtk-CRITICAL **: gtk_printer_get_backend: assertion 'GTK_IS_PRINTER (printer)' failed

A more reliable workaround might instead be to print to PDF.
Comment 15 Drew Parsons 2016-10-05 06:16:36 UTC
I've reported the native (gtk3/gnome) print dialog crash in bug#102999.
Comment 16 QA Administrators 2018-01-20 03:33:28 UTC Comment hidden (obsolete)
Comment 17 Buovjaga 2018-04-06 06:47:56 UTC
*** Bug 114590 has been marked as a duplicate of this bug. ***
Comment 18 Commit Notification 2019-03-27 08:58:38 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/223eac2d666263b127a7e774fd74352581a9209f%5E%21

rhbz#1691287 tdf#53029 ui prompt for printer authentication

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Caolán McNamara 2019-03-27 09:05:55 UTC
I'm not entirely sure that all duplicates and sub issues are the same thing, so if there are remaining issues after this commit open a new bug for them rather than reopening this one
Comment 20 Commit Notification 2019-04-12 12:03:27 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/a9c00875cfe90920940586d350f8be6898f3e536%5E%21

rhbz#1691287 tdf#53029 ui prompt for printer authentication

It will be available in 6.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.