Support

Please contact us via email servicedesk@id.ethz.ch or phone +41 44 632 77 77

Service Information and Update

Blog eintrag


Add a printer with Linux



Manuals


The "ETH Printers" tool is a graphical application for selecting and installing ETH printers. It has been tested for Ubuntu 20.04 and Fedora 32. By default, the PPD Multibrand is used, which can control the most important functions of our devices.

1. Download software

https://software.opensuse.org/download/package?project=home:ethz&package=ethz-cups-config-app

2. Save file

3. Open folder

4. Install application

5. Log in with PC Login

6. Launch application from terminal

ethz-cups-config-app

7. Reinstall missing packages and restart application

sudo apt-get install smbclient --no-install-recommends

ethz-cups-config-app

8. Login with ETH user account

Domain = d

9. Select and install printer

10. Log in to the print dialog with ETH user account

d\<ETH user name>

→ Optional: select 'Remenber password' to save the password for the next printout.

11. Manage saved password

With the command 'seahorse' passwords can be viewed, changed or deleted.


1 Preface

For printing via Kerberos, the IT Services make their own Cups backend available.
The instructions refer primarily to managed multi-user computers:

The administrator manages several computers.
The manual is structured in such a way that the individual steps can be included in a script.

2 Requirements

The administrator has root rights.
The user-login on the computer should already be done with Active-Directory.
The binding to the Active Directory is described in the following instructions:

https://cd-portal.sp.ethz.ch/linux/Wiki/Authentisierung%20mit%20sssd.aspx

3 Version of the operating system

The version can be verified with the following command:

$ cat /etc/os-release

4 Install Cups backend smbethz

Download the cups backend smbethz and copy it into the right directory:

$ su -c 'wget https://printing.sp.ethz.ch/ethps/SiteAssets/SitePages/RHEL-7-Fedora-22-kerberos/smbethz -O /usr/lib/cups/backend/smbethz'


Set the access rights and the owner:

$ su -c 'chmod 700 /usr/lib/cups/backend/smbethz'
$ su -c 'chown root:root /usr/lib/cups/backend/smbethz'

5 Setting up a new printer with the backend

5.1 Device URI

The following format is used for our setup:

smbethz://<printserver>/<printqueue>

For example:

smbethz://pia01.d.ethz.ch/p-stbh-02

A list of the available printers can be found at :

https://pia01.d.ethz.ch (Zentrum)
https://pia02.d.ethz.ch (Hönggerberg)

5.2 Installing PPD

Under openprinting.org’ PPD can be searched and installed as a package.
In this manual we install the PPD for a ’Ricoh MPC 3003’.

$ su -c 'rpm -ip http://www.openprinting.org/download/printdriver/components/lsb3.2/main/RPMS/noarch/openprinting-ppds-postscript-ricoh-20140829-1lsb3.2.noarch.rpm'

The PPD is then stored at :

/opt/OpenPrinting-Ricoh/ppds/Ricoh/Ricoh-MP_C3003-Postscript-Ricoh-en.ppd.gz

5.3 Start printer installation

The installation is done according to the following scheme:

lpadmin -p <NAME> -v smbethz://<SERVER>/<PRINTER> -E -P <PATH-TO-PPD> -D <NAME> -L <LOCATION> -o printer-is-shared=false -o auth-info-required=negotiate

In our example, that would be:

$ su -c 'lpadmin -p Ricoh3003 -v smbethz://pia01.d.ethz.ch/p-stbh-02 -E -P /opt/OpenPrinting-Ricoh/ppds/Ricoh/Ricoh-MP_C3003-Postscript-Ricoh-en.ppd.gz -D Ricoh3003 -L STBH -o printer-is-shared=false -o auth-info-required=negotiate'

6 Testing

Send a test job as an authenticated user (not as root):

$ echo -e '%!PS-Adobe-1.0\n /Helvetica findfont 200 scalefont setfont 100 100 moveto (Test) show showpage' | lpr -P Ricoh3003

7 SELinux Policy

If SELinux is enabled, an appropriate policy extension must be created.
The policy extension is described in the following instructions:

https://cd-portal.sp.ethz.ch/linux/Wiki/SELinux%20Basics.aspx

For testing purposes, the policy can be turned off as follows:

$ su -c 'setenforce 0'

8 Unnecessary authentication message under Fedora 21

If an unnecessary message appears, it can be removed with a patch.
The following command creates the file '/etc/yum.repos.d/print-auth.repo':

$ echo -e '[print-auth]
name=Print Auth $releasever - $basearch
baseurl=http://files.intevation.de/projects/print-auth/kerberos/$releasever
enabled=1
gpgcheck=1
gpgkey=http://files.intevation.de/projects/print-auth/kerberos/$releasever/\c' >/etc/yum.repos.d/print-auth.repo; echo -e 'repodata/repomd.xml.key' >>/etc/yum.repos.d/print-auth.repo

And then update:

$ su -c 'yum update'

9 Error message in RHEL

If you get the error message '/usr/lib/cups/filter/foomatic-rip not available' in the log '/var/log/cups/error_log' you have to add the following package:

$ su -c 'yum install foomatic'

Multibrand-3.1 Beta

Cups 2.4.1 (cups-config --version) has a bug (https://github.com/OpenPrinting/cups/issues/421) and everything is printed in monochrome.
With Multibrand-2.9.2 the bug is fixed with a workaround, but this can have unwanted side effects.
With  Multibrand-3.1.1 Cups must be stopped (service cups stop), the line "Option print-color-mode monochrome"  in the file /etc/cups/printers.conf deleted and Cups started again (service cups start), so that it prints in color.
The bug will only be fixed with 2.4.3 (https://github.com/OpenPrinting/cups/pull/500).

Multibrand-3.1.1 can be installed e.g. with following command:
    lpadmin -p 'printername' -E -v 'smb://pia01.d.ethz.ch/card-ethz' -P 'Multibrand-3.1.1.ppd' -o auth-info-required=username,password

Files


Cups backend:
smbethz

Print Service PPD (Für Nashuatec und HP Drucker. Kompatible Geräte sind im PPD aufgelistet.):

multibrand-2.9.2.ppd

HP PPDs:

HP Color LaserJet Flow X58045 (PPD not yet available)
HP_Color_LaserJet_Flow_E87650.ppd
HP_Color_LaserJet_Flow_MFP_E786.ppd
HP_Color_LaserJet_Flow_MFP_E786.ppd
HP_Color_LaserJet_Flow_E77830.ppd
HP_Color_LaserJet_Flow_E67660.ppd
HP_Color_LaserJet_Flow_E57540(M577).ppd
HP_Color_LaserJet_Flow_E55040(M553).ppd

  • No labels