Quick Start Guide (for Linux)

Important

The following section assumes the reader has knowledge of general Unix/Linux system management including using the command-line, creating users, editing configuration files and understanding file permissions.

PaperCut NG can be set up on a conforming Linux system currently hosting printers. This quick start guide walks through the installation process step-by-step. An outline of the main tasks include:

  1. Check system requirements

  2. Create the host user account

  3. Download and install

  4. Run the configuration wizard

  5. Configure printers

  6. Print a test document and verify charging has occurred

  7. Share client software to workstations

  8. Access and print from another workstation

The quick start guide provides a basic overview of the installation and configuration procedure. For a detailed explanation of the process and an understanding of the underlying steps, please see Chapter 17, PaperCut NG on Linux.

Step 1 - Checking system requirements

Before proceeding with the installation the system administrator should take a few moments to verify system requirements. Is the operating system version supported and are patches up-to-date? Take a few minutes to verify the system is current and supported (see the section called “System Requirements”).

Are printer(s) installed and hosted on this system and are they exposed to the network either via CUPS or Samba? Administrators should ensure that the print queues are set up and working as expected before attempting to install PaperCut NG.

In a multi-user environment, printers are often shared with other network users. Other workstations should connect to these printers as "Network Printers". Ensure workstations are configured to print to the shared print queues. For example a Windows workstation may connect to a samba exposed printer via \\[samba_server]\[printer].

If the printers are currently not installed and configured, this task should be performed and verified before proceeding further.

Step 2 - Creating the host user account

PaperCut NG runs and installs under a non-privileged user account called "papercut". The installation location is denoted by the papercut user's home directory. Create a user account on this system called papercut. This is usually done by logging in as root and at the command prompt entering:

        shell> useradd -d /home/papercut papercut
                

The syntax for useradd and groupadd may differ slightly on different versions of Linux. They may also be called adduser and addgroup.

The user's home directory (the -d option) denotes the install location. /home/papercut is the recommended location. Administrators may however also consider alternate install locations depending on personal preference. Alternates including:

  • /usr/local/papercut

  • /opt/papercut

Important

This quick start guide assumes the install location is /home/papercut. If an alternate home location is defined, some of the paths listed in subsequent sections will require modification.

Step 3 - Downloading and installing

PaperCut NG is supplied as a self-extracting and self-installing archive. Log on as the newly created papercut user and download and execute the installer:

        shell> su - papercut
        shell> wget [download url from PaperCut Software website]
        shell> sh ./pcng-setup-linux-i686.sh
                

Follow the installation instructions and enter the root password when requested.

Important

Ensure you login as the user papercut so that the user's environment is sourced so the home directory (install location) is correctly defined.

The Linux install process

Figure 1.11. The Linux install process

Step 4 - Running the configuration wizard

After the installation has completed, open a web browser on any network connected system and connect to http//[server_name]:9191/admin. The configuration wizard will display. The configuration wizard must be completed before the system can be accessed.

Important

The Application Server listens for connections on port 9191 and 9192 (SSL). Ensure that any local IP filtering software such as iptables is not configured to block any local network traffic on this port. Some desktop style Linux distributions may have strict IPTables filtering enabled by default.

PaperCut NG Configuration wizard

Figure 1.12. PaperCut NG Configuration wizard

The configuration stages in the configuration wizard are explained below.

Administrator Password

This is the master password for the main admin account. This password is independent of the operating system or domain passwords. Keep knowledge of this password secure!

Tip

Treat this password like your router/modem management passwords. It is independent of your domain accounts and needs to be kept secure.

Default Print Cost

This is the default cost-per-page assigned to the printers. This setting can be changed on a per printer basis after installation. Choosing a sensible cost now will help minimize future setup. For example in the USA, a value of $0.05 would be appropriate for many standard black & white printers.

Initial User Credit

Users can be assigned an initial starting credit. This ensures they have funds in their account as soon as the system is enabled. An option also exists to control what happens when users run out of credit or exceed their quota. If you are evaluating PaperCut NG it might be appropriate not to disable printing when a user's funds run out. This way you can be assured that user printing is not disrupted during the evaluation. These settings may be changed after setup.

User/group synchronization

PaperCut NG imports user information out of the system or domain. On a Linux system three options are normally available:

  • Unix Standard (e.g. PAM, nsswitch, passwd/group)

  • Samba

  • LDAP

Select Unix Standard if the user accounts are setup and defined on the local system as standard Unix accounts or mapped into the system from a central directory service such as LDAP or eDirectory via nsswitch.conf and PAM. Most large established networks will use this option.

Select Samba if the central user directory is a Windows Domain. The Samba option is only available if Samba is installed on the system. The Samba option is appropriate on medium to small networks currently operating in a Windows Domain environment.

The Samba option requires additional information such as the name of a domain server, and login credentials for an Administrator level account. This information is requested on the subsequent wizard screen. Take care to ensure this information is complete and correct.

More information on user/group synchronization on Linux is available in Chapter 17, PaperCut NG on Linux.

During evaluation, most sites will opt to import all users from the system/domain into PaperCut NG. An option also exists to import a subset of users from a given group. This option is pertinent when it is known that only a subset of users will only ever use the printers.

User sync configuration wizard page

Figure 1.13. User sync configuration wizard page

After completing the configuration wizard you will be presented with a user synchronization status screen. After this is completed, the interface will offer an option to Login. Take some time to log in and browse the interface. There are many options and now is a good time to have a look at some of the key areas of the application. Take some time to explore!

Step 5 - Configuring Printers

CUPS

If the print queues are managed and controlled via CUPS, the Device URI on each printer should be modified so the papercut backend is incorporated into the print process. This can be done either via the CUPS web admin interface or by manually editing the CUPS printers.conf file.

  1. Open the printers.conf (e.g. /etc/cups/printers.conf)

  2. Prefix the DeviceURL for each printers with "papercut:". For example:

        DeviceURI socket://192.168.1.200:9100
                                            

    Would become:

        DeviceURI papercut:socket://192.168.1.200:9100
                                            

  3. Restart cupsd so the new configuration is detected (e.g. /etc/init.d/cupsd reload)

Samba

If the print queues are exposed to network workstations using Samba (Samba Website) , and a print system other than CUPS is used (e.g. BSD, LPRNG, SYSV, etc.) the smb.conf needs some additional configuration. The "print command" needs to be replaced with a PaperCut NG command.

  1. Open the smb.conf (e.g. /etc/samba/smb.conf)

  2. Under the [globals] section insert the line:

     print command=/home/papercut/providers/print/linux-i686/samba-print-provider
        -u "%u" -J "%J" -h "%h" -m "%m" -p "%p" -s "%s" 
        -a "[standard print command]" &
    
     (IMPORTANT: The above information should appear all on a single line. 
     Note the use of the & (ampersand) on the end of the line.)
                                

    where [standard print command] is the command that would normally called for printing. Typical examples of commands usually used for printer are listed below:

    TypeCommand

    BSD, AIX, QNX, LPRNG or PLP

    lpr -r -P%p %s

    SYSV or HPUX

    lp -c -d%p %s; rm %s

    Table 1.1. Standard print commands

    More information on standard print commands is available under the Samba documentation installed on your system (see man smb.conf).

Step 6 - Print a test document and verify charging has occurred

To detect and register the printer with the PaperCut NG system, a test print job needs to be performed on each printer (printers are added to the system on first print). Perform a test print on each printer and verify that it is now listed in the PaperCut NG interface under the Printers. Perform a number of test prints to verify that multi-page documents are accounting as expected. Repeat this process for each printer.

Step 7 - Sharing client software

PaperCut NG includes optional client software. The client software can be run on workstations to provide users with popup messages, feedback on their account balance, and access to advanced features such as shared accounts.

Client software is usually made available to workstations by "sharing" the client directory in a read-only form. Common sharing methods on Linux system include:

  • Samba - to share files to Windows based workstations.

  • NFS - to share to Linux/Unix based workstations.

To share the client directory using Samba:

  1. Log into the system as root

  2. Open the Samba configuration file smb.conf in a text editor. (e.g. /etc/samba/smb.conf)

  3. Define a new share as follows:

        [pcclient]
            comment = PaperCut Client
            read only = yes
            public = yes
            path = /home/papercut/client
                                

  4. Save the file and restart Samba to apply the changes. (e.g. /etc/init.d/samba restart)

Step 8 - Accessing and printing from another workstation

The following section assumes the remote system is a Microsoft Windows based workstation.

  1. Log onto a remote workstation as a standard user. Check that the printer shared on the print server is set up and listed under StartPrinters.

  2. Print a test document such as a web page or a Microsoft Word document.

  3. Start the client tool by opening a file explorer (Windows Explorer) and navigating to: \\[servername]\pcclient. Replace [servername] with the network name associated with the server.

  4. Run the program pc-client.exe. The account balance window should display.

    User client

    Figure 1.14. User client

  5. Click on the Details link. The web browser should open. Alternatively you may open a standard web browser to the URL http://[servername]:9191/user. Enter the user's username and password. You are now in the user section.

  6. Click on the print history section. Your test print job should be listed.

Important

The client tool is optional and not required for monitoring or charging. It provides:

  • A quick overview of the user's account balance

  • A way to access to user pages with one client

  • Deliver messages to the users

  • Advanced features such as the account selection popup

The client is usually set to run automatically when the user logs into the system. Setup and deployment is covered in detail later in this manual (See the section called “User Client Deployment”).

Tip

Further information on setting up and configuring PaperCut NG on Linux is available in Chapter 17, PaperCut NG on Linux.

What next?

This concludes the Quick Start Guide (for Linux). You may like to take some time to explore the features of PaperCut NG before continuing reading at Chapter 2, Implementation by Example or Chapter 3, Quick Tour.