Setting up a UiO printer on an non-UiO Linux installation
Prerequisite: driver for the printer, get from, e.g., biotin2:/usr/share/ppd/pullprint/Ricoh-MP_C6004-Postscript-Ricoh.ppd.gz
- Ubuntu:
apt-get install cups /usr/sbin/lpadmin -p "pullprint_Ricoh" -E -v "lpd://UIOUSER@pullprint.uio.no/ricoh" \ -P "./Ricoh-MP_C6004-Postscript-Ricoh.ppd.gz" -D "Ricoh printer queue (Safecom pull-print)" \ -L "Any Ricoh printer" -o Resolution=600dpi -o PageSize=A4 -o Duplex=DuplexNoTumble \ -o printer-is-shared=false -o printer-error-policy=abort-job
(replacing UIOUSER
with your UiO user name - if this is the same as the local user name, you may also use the simpler "lpd://pullprint.uio.no/ricoh"
instead).
That is all.
Old documentation, outdated since September 2021
install the following:
- Fedora/Redhat:
dnf install samba-common-tools samba system-config-printer-libs.noarch system-config-printer-udev.x86_64 system-config-printer-udev.x86_64 samba-krb5-printing krb5-devel krb5-libs krb5-workstation krb5-auth-dialog krb5-pkinit *samba*
- Debian GNU/Linux and Ubuntu:
apt-get install -y libsmbclient libsmbclient-dev libwbclient-dev libwbclient0 python-samba samba-common samba-common-bin samba-dev samba-libs samba-vfs-modules smbclient winbind python3-smbc python-smbc
vim /etc/cups/printers.conf
# Printer configuration file for CUPS v2.2.8 # Written by cupsd on 2019-05-29 17:01 # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING <DefaultPrinter Ricoh> UUID urn:uuid:d4264f0e-330e-392b-54cb-d7481117480c AuthInfoRequired username,password Info Ricoh Location Kopyrom MakeModel Ricoh MP C4504ex PDF DeviceURI lpd://USER@pullprint.uio.no/Ricoh State Idle StateTime 1559142101 ConfigTime 1559141597 Type 12540 Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer </DefaultPrinter>
The important parts here is
AuthInfoRequired username,password
in order to force the system to prompt with a username and a password
and USER must be replaced with a valid NCMM user
DeviceURI lpd://USER@pullprint.uio.no/Ricoh
[georgmar@bioteklin210 ~]$ cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or # read the smb.conf manpage. # Run 'testparm' to verify the config is correct after # you modified it. [global] workgroup = UIO security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw client max protocol=SMB3
Important parts here:
- workgroup set to UIO
- client max protocol=SMB3
Restart the above services
sudo systemctl restart cups.service sudo systemctl restart smbd.service
Make sure SELinux does not cause any troubles
sudo audit2allow -a -M kotkot1 sudo semodule -i kotkot1.pp
Download Ricoh-MP_C4504ex.ppd from https://www.openprinting.org/printer/Ricoh/Ricoh-MP_C4504ex
replace USER with appropriate username
kinit USER@uio.no sudo lpadmin -x Ricoh sudo lpadmin -E -U USER -p Ricoh -E -v lpd://USER@pullprint.uio.no/Ricoh -m Ricoh-MP_C4504ex -P ./Ricoh-MP_C4504ex.ppd -L "Kopyrom" -o auth-info-required=username,password sudo lpadmin -E -U USER -d ricoh sudo cupsaccept -E -U USER ricoh sudo cupsenable -E -U USER ricoh lpr -E ./out lpq -E
The big surprise here was that USIT uised the line printing protocol (ldp://) for linux instead of SMB. And of course they did not tell us
Additional steps:
We need tpo authenticate you against the UiO domain, and then print a test document, say a pdf.
- Authenticating against the UiO domain
1. open a terminal and type
kinit USER@UIO.NO
it will as you your UiO password. Type it in the terminal.
This will authenticate you against the UiO domain but only for the first time, but will make the second step easier.
2. Maintaining the authentication: I don't know if there is such a panel in your desktop manager, but in Gnome there is the "Online accounts" in setting. And then the "Enterprise Login" is hidden at the bottom of the page under the three dots. Straight forward, enter
USER@UIO.NO
at the textbox that will open, make sure to click/check "Remember my password" and then type your password anywhere asked. Save, and you are done.
If 2. is not available, we have another route, but I will come upstairs tomorrow to show you: basically when you print the file there should be a dialog to prompt you to authenticate.
3. Print a file and then go to any Ricoh printer with your UiO id and pick up