Choose your language

Choose your login

Contact us

How to install PaperCut NG on Univention Corporate Server

THE PAGE APPLIES TO:

These notes document the installation process of PaperCut NG for Linux on a Univention Corporate Server (UCS). They should be read in conjunction with PaperCut NG’s standard Linux installation documention here.

More information about Univention products can be found here.

A big thank you to Nico at Univention for help to get this working.

These notes assume you already

  • Have the UCS system installed and running
  • Know the root password and can login to the UCS system via ssh

Steps to install

Note. A sample script is provided below to automate many of these steps

  1. Login to the web based UCS management console on your UCS system
  2. From the Univention App Center
    1. Install the “Univention Print Server (CUPS)” package
    2. Make sure the “Print Server Quota (pykota)” package is not installed
  3. Check that printer queues are configured and users can print successfully.
  NOTE: DO NOT tick the “Enable Quota Support” box.
  Handy tip. You can also administer CUPS printers from
   https://<ucs-system-address>:631/
  1. Download the PaperCut NG installer file for Linux from https://www.papercut.com/products/ng/download/
  2. Copy over the installer file to UCS system, for instance into directory /tmp.e g.
   scp pcng-setup-*-linux-x64.sh root@<ucs-system-address>:/tmp
  1. On a terminal open up a connection to the UCS system root shell i.e.
   ssh root@<ucs-system-address>
  1. Enter the following commands to open up the PaperCut ports
    
ucr set security/packetfilter/tcp/9192/all=ACCEPT
ucr set security/packetfilter/tcp/9191/all=ACCEPT
service univention-firewall restart

  1. Run the following command to create a local PaperCut user and group to own the software installation
   adduser --home /usr/local/papercut --gecos "PaperCut Admin" papercut

Important note: The command above creates both a local user and group with the same name. This is by design, do not set up this user account in LDAP.

  1. Create a dedicated account in the LDAP directory to provide PaperCut with browser access to the LDAP store for user account information. Don’t forget to make a note of the user dn and password for later. For example.
    
password="$(makepasswd --chars=24)"
eval "$(ucr shell ldap/base)"
univention-directory-manager users/user create --ignore_exists \
    --position "cn=users,$ldap_base" \
    --dn "uid=papercut-ldap,cn=users,$ldap_base" \
    --set username="papercut-ldap" \
    --set password="$password" \
    --set firstname="PaperCut " \
    --set lastname="LDAP Account" \
    --set description="Account used by PaperCut to authenticate against LDAP directory"
echo User dn : uid=papercut-ldap,cn=users,$ldap_base, Password : $password

  1. Run the PaperCut installer. Answer no to “Would you like to perform these tasks now”
    sudo -iu papercut /bin/bash /tmp/pcng-setup*linux-x64.sh
  1. Run root tasks with the following command
    /usr/local/papercut/MUST-RUN-AS-ROOT
  1. Wait a few minutes for the PaperCut NG server to come up. If there is a problem look in the server log
   /usr/local/papercut/server/logs/server.log
  1. Open a browser to the following url to complete the setup process and follow the prompts
   https://<ucs-system-address>:9192/admin

NOTE: User/group synchronization. When you run the setup wizard in the step up wizard you will be prompted for a source of user accounts. Select LDAP Under the “Admin user DN” and “Admin user password” fields enter the values used in step 9 above

The installation of PaperCut NG Licenses is explained here https://www.papercut.com/support/resources/manuals/ng-mf/common/topics/license-install.html

Example Installer Script

The following script automates steps 7–12 above.

#!/usr/bin/env bash

APP=“papercut” password="$(makepasswd –chars=24)" eval “$(ucr shell ldap/base)”

ucr set security/packetfilter/tcp/9192/all=ACCEPT ucr set security/packetfilter/tcp/9191/all=ACCEPT service univention-firewall restart

Create a local Papercut user and group

(echo $passward ; echo $password)|adduser –home /usr/local/$APP –gecos “PaperCut Admin” $APP

Create an dedicated account to connect to LDAP

univention-directory-manager users/user create –ignore_exists
–position “cn=users,$ldap_base”
–dn “uid=$APP-ldap,cn=users,$ldap_base”
–set username="$APP-ldap"
–set password="$password"
–set firstname="$APP"
–set lastname=“LDAP Account”
–set description=“Account used by $APP to authenticate against LDAP directory” && echo “User account "uid=$APP-ldap,cn=users,$ldap_base" created with password "$password"” read -r < /dev/tty -p “Please make a note of the details to configure ldap access in PaperCut later. Then hit any key to begin install process” echo

Run the installer script. Note This is interactive

sudo -iu $APP /bin/bash /tmp/pc*-setup*linux-x64.sh

Now

echo “Now running root tasks” echo /usr/local/$APP/MUST-RUN-AS-ROOT

echo “Installation has finished and PaperCut server should be starting in the background.” read -r < /dev/tty -p “I will now tail the log so that progress is visible. Hit <Ctrl>-c to stop display of log. Now hit any key to proceed”

tail -f /usr/local/$APP/server/logs/server.log


Categories: How-to Articles , Installing, Uninstalling and Migrating


Keywords: Univention

Comments

Last updated February 15, 2024