Difference between revisions of "Printing"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The NPG maintains a network print server on [[jalapeno]].unh.edu to which users with NPG Linux accounts can print. This server currently manages [[Wigner]], an HP Color Laserjet printer in DeMeritt 362.  
+
The NPG maintains a network print server on [[corn]].unh.edu to which users with NPG Linux accounts can print. This server currently manages [[Wigner]], an HP Color Laserjet printer in DeMeritt 362.  
  
Users can also print to UNH Library and Cluster printers, but UNH charges per page for the service. Printouts to the UNH Cluster queue can be picked up in the Physics Library on the first floor of DeMeritt.  
+
Users can also print to UNH Library and Cluster printers, but UNH charges per page for the service. Printouts to the UNH Cluster queue can be picked up in the Physics Library on the first floor of DeMeritt.
  
=Wigner=
+
=Printer Setup on Clients=
 +
These instructions are for clients trying to print.
 +
 
 +
==Wigner==
  
 
Wigner is an HP Color LaserJet 4700dn network printer located in DeMeritt 362. It is only accessible via the Samba print share on [[corn]] (address smb://corn.unh.edu/wigner). You will need to have a system administrator create a Samba account on the print server in order for you to be able to access the printer.  
 
Wigner is an HP Color LaserJet 4700dn network printer located in DeMeritt 362. It is only accessible via the Samba print share on [[corn]] (address smb://corn.unh.edu/wigner). You will need to have a system administrator create a Samba account on the print server in order for you to be able to access the printer.  
 +
 +
Note about Passwords: Samba sometimes has trouble with special characters in passwords. If you have trouble printing try changing your password either to something without special symbols, or with escape characters (a backslash '''\''') before the special characters.
  
 
'''NOTE:''' Printing to [[corn]] only works on wired connections, or connection via the authenticated unh-highspeed wireless network. You cannot access the print server via regular UNH wifi. This is due to UNH's firewall policies, and not something we can control.
 
'''NOTE:''' Printing to [[corn]] only works on wired connections, or connection via the authenticated unh-highspeed wireless network. You cannot access the print server via regular UNH wifi. This is due to UNH's firewall policies, and not something we can control.
  
==Setup on Mac==
+
===Setup on Mac===
  
 
These instructions are for the old print server on jalapeno and need to be updated. They probably won't work. Updates coming soon.
 
These instructions are for the old print server on jalapeno and need to be updated. They probably won't work. Updates coming soon.
Line 18: Line 23:
 
#Choose the '''Advanced''' tab in the Add Printer window.
 
#Choose the '''Advanced''' tab in the Add Printer window.
 
#*The Advanced tab may not appear by default. To add the Advanced tab follow these instructions:
 
#*The Advanced tab may not appear by default. To add the Advanced tab follow these instructions:
#*#Right Click (control + click) on tab bar and choose '''Customize Toolbar...'''[[Image:CustomizePrintingToolbar.png]]
+
#*#Right Click (control + click) on tab bar and choose '''Customize Toolbar...'''<br/>[[Image:CustomizePrintingToolbar.png]]
#*#Drag and drop the Advanced item to the tab bar.[[Image:DragAdvancedTab.png]]
+
#*#Drag and drop the Advanced item to the tab bar.<br/>[[Image:DragAdvancedTab.png]]
 
+
#Enter the following settings into the Advanced Add Printer window:<br/>[[Image:printersettingsmac.png]]
#*Protocol: '''Internet Printing Protocol - IPP'''  
+
#*Type: '''Windows printer via spoolss'''  
#*Address: '''jalapeno.unh.edu'''
+
#*URL: '''smb://corn.unh.edu/wigner'''
#*Queue: '''Wigner'''
 
 
#*Name: '''Wigner'''
 
#*Name: '''Wigner'''
 
#*Location: '''DeMeritt 362'''
 
#*Location: '''DeMeritt 362'''
Line 29: Line 33:
 
#*On the "Installable Options" screen make sure that '''Duplex Unit''' is checked.
 
#*On the "Installable Options" screen make sure that '''Duplex Unit''' is checked.
  
==Setup on Linux (Gnome)==
+
===Setup on Linux (Gnome)===
  
 
#In the System menu go to Administration -> Printing
 
#In the System menu go to Administration -> Printing
Line 39: Line 43:
 
#On the Installable Options screen make sure '''Duplex Unit''' is checked.
 
#On the Installable Options screen make sure '''Duplex Unit''' is checked.
 
#Enter whatever you think is appropriate in the Name, Description and Location fields.
 
#Enter whatever you think is appropriate in the Name, Description and Location fields.
 
  
 
Once you hit apply on the final screen you should be able to send print jobs to Wigner. When you do so it will prompt you for your npg username and password.
 
Once you hit apply on the final screen you should be able to send print jobs to Wigner. When you do so it will prompt you for your npg username and password.
  
=UNH Library / Cluster Printers=
+
==UNH Library / Cluster Printers==
  
 
Users can print configure their own machines to print to any UNH Library printer via a single print server. Printing costs $0.10 per page for Black & White, and $0.60 per page for Color. There is a discount for printing double sided. More information is available [http://www.library.unh.edu/services/techcomp/print.shtml here].   
 
Users can print configure their own machines to print to any UNH Library printer via a single print server. Printing costs $0.10 per page for Black & White, and $0.60 per page for Color. There is a discount for printing double sided. More information is available [http://www.library.unh.edu/services/techcomp/print.shtml here].   
  
==Setup on Mac==  
+
===Setup on Mac===
  
 
There are detailed instructions for configuring the UNH Library printers available at the UNH IT website [http://clusters.unh.edu/services/printing/mac_printing.html here]
 
There are detailed instructions for configuring the UNH Library printers available at the UNH IT website [http://clusters.unh.edu/services/printing/mac_printing.html here]
  
==Setup on Linux==
+
===Setup on Linux===
  
 
In order to print to the UNH Library printer you first need to install a driver for Dell 5110cn Laser printers. An RPM package for Red Hat / CentOS / Fedora machines can be downloaded [http://help.gravity.psu.edu/downloads/Dell-5110cn/Linux/ here]. A PPD file for this printer can be downloaded [http://ieng9.ucsd.edu/~lp/Dell_5100cn.ppd here].
 
In order to print to the UNH Library printer you first need to install a driver for Dell 5110cn Laser printers. An RPM package for Red Hat / CentOS / Fedora machines can be downloaded [http://help.gravity.psu.edu/downloads/Dell-5110cn/Linux/ here]. A PPD file for this printer can be downloaded [http://ieng9.ucsd.edu/~lp/Dell_5100cn.ppd here].
Line 60: Line 63:
 
#Click Add (enter your system's root password)
 
#Click Add (enter your system's root password)
 
#Under Devices expand Network Printer and select '''LPD/LPR Host or Printer'''
 
#Under Devices expand Network Printer and select '''LPD/LPR Host or Printer'''
#In the Host field enter '''bitey.unh.edu''' and in the Queue field enter '''Clusters'''
+
#In the Host field enter '''snuffy.unh.edu''' and in the Queue field enter '''Clusters'''
 
#In the Choose driver dialog select '''Dell''' as the make
 
#In the Choose driver dialog select '''Dell''' as the make
 
#Select the driver for '''Dell Color Laser 5110cn'''
 
#Select the driver for '''Dell Color Laser 5110cn'''
 
#Enter whatever you think is appropriate in the Name, Description and Location fields.
 
#Enter whatever you think is appropriate in the Name, Description and Location fields.
  
Once these settings are entered you should be able to pick up your printouts from the Library printers.  
+
Once these settings are entered you should be able to pick up your printouts from the Library printers.
  
= Old Printers (No longer available) =
+
==Old Printers (No longer available)==
== Myriad ==
+
===Myriad===
 
Myriad is an HP Color LaserJet 4600, using IPP on the default port. Its address is myriad.unh.edu, or 132.177.88.99. It's located in the Physics department office. It is currently not working, and needs repaired.  
 
Myriad is an HP Color LaserJet 4600, using IPP on the default port. Its address is myriad.unh.edu, or 132.177.88.99. It's located in the Physics department office. It is currently not working, and needs repaired.  
  
== HP5000 ==
+
===HP5000===
 
The HP5000 is, as the name suggests, an HP LaserJet 5000, using JetDirect on the default port. Its address is hp5000.unh.edu, or 132.177.88.67. It's located in the student cluster.
 
The HP5000 is, as the name suggests, an HP LaserJet 5000, using JetDirect on the default port. Its address is hp5000.unh.edu, or 132.177.88.67. It's located in the student cluster.
  
== ClusterPrinter ==
+
===ClusterPrinter===
 
The Clusterprinter is a Dell M5200, using JetDirect. Its address is 132.177.90.253. It's located in the student cluster.
 
The Clusterprinter is a Dell M5200, using JetDirect. Its address is 132.177.90.253. It's located in the student cluster.
 +
 +
=CUPS and Samba Administration=
 +
To administer the CUPS server you can either do it manually by changing the /etc/cups/cupsd.conf file or accessing the WebUI.  To access the WebUI you must first run this command on your local machine:
 +
ssh -L 8080:localhost:631 root@corn.unh.edu
 +
Then in a web browser you must go to localhost:8080.
 +
Samba is used as the database of users allowed to print to Wigner. Admin username is "admin".
 +
 +
==CUPS and Samba Relationship==
 +
Our system is setup so that users will be printing to Samba port on corn and then Samba passes (after it authenticates the user) that job to the CUPS server.
 +
 +
===CUPS===
 +
The CUPS server is setup as accepting all jobs on the local machine but not from any other outside IPs, this configuration is seen here in the /etc/cups/cupsd.conf:
 +
<Location />
 +
  # Allow shared printing and remote administration...
 +
  Order allow,deny
 +
  Allow @LOCAL
 +
</Location>
 +
 +
===Samba===
 +
Samba will be listening on port 445.  The crucial parts to the Samba configuration are found in /etc/samba/smb.conf and the config looks like this:
 +
[Global]
 +
  # ----------------------- Netwrok Related Options -------------------------
 +
  workgroup = NPG
 +
  # ----------------------- Standalone Server Options ------------------------
 +
  security = user
 +
  passdb backend = tdbsam
 +
  # --------------------------- Printing Options -----------------------------
 +
  load printers = yes
 +
  cups options = raw
 +
  #obtain list of printers automatically on SystemV
 +
  printcap name = cups
 +
  printing = cups
 +
[printers]
 +
  comment = All Printers
 +
  path = /var/spool/samba
 +
  browseable = no
 +
  guest ok = no
 +
  writable = no
 +
  printable = yes
 +
  use client driver = Yes
 +
 +
==Adding Users to Samba for Printing==
 +
Once you have setup a user in LDAP you must give them printing capabilities, which will be on Sambe.  Samba will then send the print request to the CUPS server locally, because the CUPS server is accessible locally.
 +
#Add the user to the samba database:
 +
#*smbpasswd -a <username>
 +
#Then have the user log into corn and reset their password:
 +
#*smbpasswd
 +
 +
==Allowing Groups to Access CUPS WebUI==
 +
To allow users who are a part of a particular group (usually groups in LDAP)to access the CUPS WebUI for administrative purposes, update this line in /etc/cups/cupsd.conf:
 +
SystemGroup sys root domain_admins
 +
Then restart with this command:
 +
service cups restart
 +
 +
==Resuming and Canceling Jobs on CUPS==
 +
#Create a SSH tunnel into corn using this command:
 +
#*ssh -L 8080:localhost:631 corn.unh.edu
 +
#Go to web browser and type localhost:8080 and the CUPS management page should appear.
 +
#Go to the Printer tab and enter the username: root password:<standard root pw>.
 +
#Once you're logged in click on Wigner.
 +
#click on the 'Maintenance' drop box and click 'Cancel All Jobs'
 +
#Click on the same drop down box and click 'Resume Printer'
 +
 +
== Page Accounting ==
 +
 +
The printertracker in /usr/local/bin on corn is actually only counting the number of submitted jobs, NOT the number of pages printed. This was a Tbow hack not implemented properly.
 +
The correct information can be had from the printer itself: https://132.177.91.242/hp/device/this.LCDispatcher?nav=hp.ColorUsage&startRecord=0
 +
Which will show you the last 100 jobs. That webpage should be parsed by a python script, or something like that....

Latest revision as of 13:18, 26 October 2016

The NPG maintains a network print server on corn.unh.edu to which users with NPG Linux accounts can print. This server currently manages Wigner, an HP Color Laserjet printer in DeMeritt 362.

Users can also print to UNH Library and Cluster printers, but UNH charges per page for the service. Printouts to the UNH Cluster queue can be picked up in the Physics Library on the first floor of DeMeritt.

Printer Setup on Clients

These instructions are for clients trying to print.

Wigner

Wigner is an HP Color LaserJet 4700dn network printer located in DeMeritt 362. It is only accessible via the Samba print share on corn (address smb://corn.unh.edu/wigner). You will need to have a system administrator create a Samba account on the print server in order for you to be able to access the printer.

Note about Passwords: Samba sometimes has trouble with special characters in passwords. If you have trouble printing try changing your password either to something without special symbols, or with escape characters (a backslash \) before the special characters.

NOTE: Printing to corn only works on wired connections, or connection via the authenticated unh-highspeed wireless network. You cannot access the print server via regular UNH wifi. This is due to UNH's firewall policies, and not something we can control.

Setup on Mac

These instructions are for the old print server on jalapeno and need to be updated. They probably won't work. Updates coming soon.

  1. Click the Apple at the top left of the screen and then choose "System Preferences..."
  2. Choose Print & Scan, and then click the lock on the bottom left of the window to make changes. You will be prompted to enter an administrator password.
  3. Press the + button to add a new printer.
  4. Choose the Advanced tab in the Add Printer window.
    • The Advanced tab may not appear by default. To add the Advanced tab follow these instructions:
      1. Right Click (control + click) on tab bar and choose Customize Toolbar...
        CustomizePrintingToolbar.png
      2. Drag and drop the Advanced item to the tab bar.
        DragAdvancedTab.png
  5. Enter the following settings into the Advanced Add Printer window:
    Printersettingsmac.png
    • Type: Windows printer via spoolss
    • URL: smb://corn.unh.edu/wigner
    • Name: Wigner
    • Location: DeMeritt 362
    • in "Print Using:" choose Select Printer Software... and then select HP Color LaserJet 4700.
    • On the "Installable Options" screen make sure that Duplex Unit is checked.

Setup on Linux (Gnome)

  1. In the System menu go to Administration -> Printing
  2. Click New (you will be prompted to enter your system's root password)
  3. Under Devices expand Network Printer and select Windows Printer via SAMBA
  4. In the smb:// field enter corn.unh.edu/wigner, make sure that "Prompt user if authentication is required" is checked
  5. In the Choose driver dialog select HP as the make
  6. On the next screen select Color Laserjet 4700 as the model. Select the recommended driver in the Drivers box to the right.
  7. On the Installable Options screen make sure Duplex Unit is checked.
  8. Enter whatever you think is appropriate in the Name, Description and Location fields.

Once you hit apply on the final screen you should be able to send print jobs to Wigner. When you do so it will prompt you for your npg username and password.

UNH Library / Cluster Printers

Users can print configure their own machines to print to any UNH Library printer via a single print server. Printing costs $0.10 per page for Black & White, and $0.60 per page for Color. There is a discount for printing double sided. More information is available here.

Setup on Mac

There are detailed instructions for configuring the UNH Library printers available at the UNH IT website here

Setup on Linux

In order to print to the UNH Library printer you first need to install a driver for Dell 5110cn Laser printers. An RPM package for Red Hat / CentOS / Fedora machines can be downloaded here. A PPD file for this printer can be downloaded here.

Follow these steps to add this printer to your Linux system:

  1. In the System menu go to Administration -> Printing
  2. Click Add (enter your system's root password)
  3. Under Devices expand Network Printer and select LPD/LPR Host or Printer
  4. In the Host field enter snuffy.unh.edu and in the Queue field enter Clusters
  5. In the Choose driver dialog select Dell as the make
  6. Select the driver for Dell Color Laser 5110cn
  7. Enter whatever you think is appropriate in the Name, Description and Location fields.

Once these settings are entered you should be able to pick up your printouts from the Library printers.

Old Printers (No longer available)

Myriad

Myriad is an HP Color LaserJet 4600, using IPP on the default port. Its address is myriad.unh.edu, or 132.177.88.99. It's located in the Physics department office. It is currently not working, and needs repaired.

HP5000

The HP5000 is, as the name suggests, an HP LaserJet 5000, using JetDirect on the default port. Its address is hp5000.unh.edu, or 132.177.88.67. It's located in the student cluster.

ClusterPrinter

The Clusterprinter is a Dell M5200, using JetDirect. Its address is 132.177.90.253. It's located in the student cluster.

CUPS and Samba Administration

To administer the CUPS server you can either do it manually by changing the /etc/cups/cupsd.conf file or accessing the WebUI. To access the WebUI you must first run this command on your local machine:

ssh -L 8080:localhost:631 root@corn.unh.edu

Then in a web browser you must go to localhost:8080. Samba is used as the database of users allowed to print to Wigner. Admin username is "admin".

CUPS and Samba Relationship

Our system is setup so that users will be printing to Samba port on corn and then Samba passes (after it authenticates the user) that job to the CUPS server.

CUPS

The CUPS server is setup as accepting all jobs on the local machine but not from any other outside IPs, this configuration is seen here in the /etc/cups/cupsd.conf:

<Location />
 # Allow shared printing and remote administration...
 Order allow,deny
 Allow @LOCAL
</Location>

Samba

Samba will be listening on port 445. The crucial parts to the Samba configuration are found in /etc/samba/smb.conf and the config looks like this:

[Global]
 # ----------------------- Netwrok Related Options -------------------------
 workgroup = NPG
 # ----------------------- Standalone Server Options ------------------------
 security = user
 passdb backend = tdbsam
 # --------------------------- Printing Options -----------------------------
 load printers = yes
 cups options = raw
 #obtain list of printers automatically on SystemV
 printcap name = cups
 printing = cups
[printers]
 comment = All Printers
 path = /var/spool/samba
 browseable = no
 guest ok = no
 writable = no
 printable = yes
 use client driver = Yes

Adding Users to Samba for Printing

Once you have setup a user in LDAP you must give them printing capabilities, which will be on Sambe. Samba will then send the print request to the CUPS server locally, because the CUPS server is accessible locally.

  1. Add the user to the samba database:
    • smbpasswd -a <username>
  2. Then have the user log into corn and reset their password:
    • smbpasswd

Allowing Groups to Access CUPS WebUI

To allow users who are a part of a particular group (usually groups in LDAP)to access the CUPS WebUI for administrative purposes, update this line in /etc/cups/cupsd.conf:

SystemGroup sys root domain_admins

Then restart with this command:

service cups restart

Resuming and Canceling Jobs on CUPS

  1. Create a SSH tunnel into corn using this command:
    • ssh -L 8080:localhost:631 corn.unh.edu
  2. Go to web browser and type localhost:8080 and the CUPS management page should appear.
  3. Go to the Printer tab and enter the username: root password:<standard root pw>.
  4. Once you're logged in click on Wigner.
  5. click on the 'Maintenance' drop box and click 'Cancel All Jobs'
  6. Click on the same drop down box and click 'Resume Printer'

Page Accounting

The printertracker in /usr/local/bin on corn is actually only counting the number of submitted jobs, NOT the number of pages printed. This was a Tbow hack not implemented properly. The correct information can be had from the printer itself: https://132.177.91.242/hp/device/this.LCDispatcher?nav=hp.ColorUsage&startRecord=0 Which will show you the last 100 jobs. That webpage should be parsed by a python script, or something like that....