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 - 24.04 and Fedora 40. 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

→ Grab binary packages directly

2. Save file

→ e.g. in the Downloads folder

3. Change to Download folder

cd Downloads

4. Install application

sudo apt install ./ethz-cups-config-app_1.0.2-1_amd64.deb

5. Install missing package

sudo apt install smbclient --no-install-recommends

6. Launch application

ethz-cups-config-app

7. 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 username>

→ 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'

  • No labels