How to install PaperCut NG on Univention Corporate Server

KB Home   |   How to install PaperCut NG on Univention Corporate Server

Main.PapercutOnUnivention History

Hide minor edits - Show changes to output

June 25, 2018, at 02:00 AM by Alec - Fix typo
Changed line 120 from:
read -r < /dev/tty -p "I will now tail the log so that progress is visible. Hit <Ctrl>-c to display of log. Now hit any key to proceed"
to:
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"
June 19, 2018, at 12:10 PM by Alec - FIxes from Nico at Univention
Changed line 40 from:
/etc/init.d/univention-firewall restart
to:
service univention-firewall restart
Changed line 56 from:
   --set firstname="PaperCut LDAP Account" \
to:
   --set firstname="PaperCut " \
Changed lines 58-59 from:
   --set description="Account used by PaperCut to authenticate against LDAP directory" \
    --set password="$password
"
to:
   --set description="Account used by PaperCut to authenticate against LDAP directory"
Changed lines 93-94 from:
/etc/init.d/univention-firewall restart
to:
service univention-firewall restart
Changed line 104 from:
   --set firstname="$APP LDAP Account" \
to:
   --set firstname="$APP" \
Changed lines 106-107 from:
   --set description="Account used by $APP to authenticate against LDAP directory" \
    --set password="$password
" &&
to:
   --set description="Account used by $APP to authenticate against LDAP directory" &&
Changed lines 3-7 from:
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|https://www.papercut.com/support/resources/manuals/ng-mf/common/topics/install-linux.html]

More information about Univention products can be found [here|https://www.univention.com/]

A big thank you to [Nico|https://twitter.com/ngulden] at Univention for helping to get this working. 
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 [[https://www.papercut.com/support/resources/manuals/ng-mf/common/topics/install-linux.html|here]].

More information about Univention products can be found [[https://www.univention.com/|here]].

A big thank you to [[https://twitter.com/ngulden|Nico]] at Univention for help to get this working.
Changed lines 3-8 from:
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 https://www.papercut.com/support/resources/manuals/ng-mf/common/topics/install-linux.html

More information about Univention products can be found here https://www.univention.com/

A big thank you to Nico (https://twitter.com/ngulden) at Univention for helping to get this working.
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|https://www.papercut.com/support/resources/manuals/ng-mf/common/topics/install-linux.html]

More information about Univention products can be found [here|https://www.univention.com/]

A big thank you to [Nico|https://twitter.com/ngulden] at Univention for helping to get this working.
Deleted lines 125-127:


TODO link your page here: https://www.papercut.com/kb/Main/Miscellaneous
Deleted lines 1-3:

TODO add page content here.

June 19, 2018, at 07:06 AM by Alec - Added a new page for Univention
Added lines 1-136:
(:title How to install PaperCut NG on Univention Corporate Server:)

TODO add page content here.


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 https://www.papercut.com/support/resources/manuals/ng-mf/common/topics/install-linux.html

More information about Univention products can be found here https://www.univention.com/

A big thank you to Nico (https://twitter.com/ngulden) at Univention for helping 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

# %item value=1% Login to the web based UCS management console on your UCS system

# %item value=2% From the Univention App Center
## Install the "Univention Print Server (CUPS)" package
## Make sure the "Print Server Quota (pykota)" package is not installed

# %item value=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/@]

# %item value=4% Download the PaperCut NG installer file for Linux from https://www.papercut.com/products/ng/download/

# %item value=5% 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@]

# %item value=6% On a terminal open up a connection to the UCS system root shell i.e.
    [@ssh root@<ucs-system-address>@]

# %item value=7% 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
/etc/init.d/univention-firewall restart
@]

# %item value=8%  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.

# %item value=9% 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 LDAP Account" \
    --set lastname="LDAP Account" \
    --set description="Account used by PaperCut to authenticate against LDAP directory" \
    --set password="$password"
echo User dn : uid=papercut-ldap,cn=users,$ldap_base, Password : $password
@]

# %item value=10% 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@]

# %item value=11% Run root tasks with the following command
    [@/usr/local/papercut/MUST-RUN-AS-ROOT@]

# %item value=12% 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@]

# %item value=13% 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
/etc/init.d/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 LDAP Account" \
    --set lastname="LDAP Account" \
    --set description="Account used by $APP to authenticate against LDAP directory" \
    --set password="$password" &&
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 display of log. Now hit any key to proceed"

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


TODO link your page here: https://www.papercut.com/kb/Main/Miscellaneous

----
''Categories:'' [[Category.Administration|+]], [[Category.Implementation|+]]
----
[-Keywords: Univention-]

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on June 25, 2018, at 02:00 AM
Printable View   |   Article History   |   Edit Article