[cups] How to print to a https IPP printer with authentication (Example mailer.epost.de/)
Jörg Thümmler
listen at vordruckleitverlag.de
Thu Jul 7 00:26:36 PDT 2022
Am 07.07.22 um 08:32 schrieb Stefan Großhauser:
>
> Hello,
>
>
> (I would like to apologize in case this is a duplicate - cannot find a search for the archive of this list.)
>
>
>
> Deutsche Post provides a service called "EPOST Mailer" https://mailer.epost.de/ .
> This service provides https URLs of network printers which can be used to "print" directly into an envelope at Deutsche Post, without having to go to the post office or to put a stamp.
>
>
> URLs look like this:
> https://mailer-printer.epost.de/kd5025991737/3025/test
>
>
>
> Now, unfortunately we have not succeeded in setting such a printer up with CUPS 2.2.6 and we were told by Deutsch Post support that currently this is actually not possible with Linux/CUPS.
> I can hardly believe this...
>
>
> There is a german user manual at https://updater.epostbusinessmailer.net/html/docs/epostmailer/E-POSTMAILER_Handbuch.pdf
> This manual repeatedly mentions the possibility to print on Linux and Mac OS.
>
>
> For MacOS they provide a sh Skript in this archive
>
> https://updater.epostbusinessmailer.net/html/docs/epostmailer/EPOSTMAILER-Netzwerkdrucker-einrichten-unter-macOS.zip
> which has the following content:
>
>
> ## BEGIN E-POSTNOW-Netzwerkdrucker-einrichten-unter-macOS.sh #####################
> set -e
> echo "Bitte geben Sie die Drucker-URL ein."
> read printer_url
> https="https"
> if [[ $printer_url != https* ]] ;
> then
> echo "Die Drucker-URL muss mit https beginnen."
> exit -1
> fi
>
> echo "Bitte geben Sie den Druckernamen ein."
> read printer_name
> if ! lpadmin -p $printer_name -P "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd" -v $printer_url -E -o printer-is-shared=false -L "Deutsche Post AG";
> then
> echo "Beim Hinzufügen des Druckers ist ein unerwarteter Fehler aufgetreten."
> exit -1
> else
> echo "Der Drucker wurde hinzugefügt."
> fi
> ## END E-POSTNOW-Netzwerkdrucker-einrichten-unter-macOS.sh #####################
>
>
>
> Hence this just calls lpadmin to create a printer. Isn't this CUPS, too?
>
>
> Deutsche Post recommends to use a driver for "Samsung SCX-6x55" from
> https://www.openprinting.org/ppd-o-matic.php?driver=Postscript-Samsung&printer=Samsung-SCX-6x55
>
>
> Now, one problem which I see with my limited CUPS knowledge is that these IPP-https printers require authentication but I see no way to provide username and password to a printer in cups.
> Is there any?
>
>
> I would appreciate any hints for tricks and any suggestions how to gather all the information which is necessary to implement it, in case something is missing in CUPS.
> Please let me know, if this this rather a topic for the dev list.
>
>
>
> best regards
>
>
> Stefan Großhauser
> IT
>
> Telefon +49 (0) 9181 2592-83
> E-Mail stefan.grosshauser at hammerbachergmbh.de
>
> Hammerbacher GmbH, Daimlerstraße 4+6, 92318 Neumarkt
> Internet: www.hammerbacher.com
>
>
>
> JETZT NEWSLETTER ABONNIEREN: https://hammerbacher.com/newsletter-anmeldung/
> Hammerbacher GmbH Registergericht Nürnberg HRB 10908Geschäftsführer Bernhard Hammerbacher, Ursula Hammerbacher, Christoph Hammerbacher, Andreas Hammerbacher
> Hausanschrift
> Daimlerstraße 4-6
> D 92318 Neumarkt Telefon
> +49(0)9181
> 2592-0 Telefax
> +49(0)9181
> 2592-28 E-Mail
> info at hammerbacher.com
> www.hammerbacher.com
>
>
>
> Haftungsausschluss / Disclaimer
> Die Informationen, die in dieser Kommunikation enthalten sind, sind ausschließlich und allein für den Empfänger bestimmt. Die Verwendung durch Dritte ist untersagt. Die Firma Hammerbacher GmbH ist nur für die von ihr eingegeben Informationen verantwortlich, jedoch nicht für die einwandfreie Übertragung oder im Zusammenhang mit der Übertragung oder dem Empfang eingetretene Veränderungen oder Verzögerungen.
> Diese E-Mail enthält vetrtrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://lists.cups.org/mailman/listinfo/cups
Hi,
authentication in cups printers is maybe added at the beginning of the
url as for samba printers:
DeviceURI smb://user:passwd@host/printer
try ipp://user:passwd@url
but i didn't test this..., but works well for smb://
You may use the lpadmin command as shown above to add the printer and
modyfy it later by http://localhost:631 to add user / pwd to the url.
Be aware! if you modify the printer next time, cups will not show and
"forget" user and pwd, so you see ipp://url and have to add user/pwd
once more (but in /etc/cupsd/printers.conf you will find the whole
string in plain text)
--
cu
jth
More information about the cups
mailing list