Un-pausing printers in OS X as a non-administrator

A sore spot for me is the print server in OS X, talk about something that should be simple. The biggest headache we have had with printing in a 1-to-1 environment are pushing drivers out to different clients and that student and faculty printer keep on pausing and because they are not an administrator they cannot un-pause them, we are going to address the second issue here. I know you can add them to the lpadmin group and be done with it, but I don’t like giving people access unless absolutely necessary when I am responsible for the uptime and reliability of the machines.

In stead we added a bit of code to our login hooks so that if a printer does get paused once the end user restarts it will empty the printer queues and un-pause any paused printers. It is a very simple concept and very useful, and no ARD to un-pause a printer, just tell them to restart which they probably need to do anyway. Below is the unPausePrinters.sh:


# Author: Joseph J. Viscomi    E-Mail: jjviscomi [at] gmail [dot] com || jviscomi [at] brehm [dot] org
# Date: 3/11/2011
# Description: This script should be used in a login hook. Upon loging on it clears any
#              print jobs in the printer queues, and unpauses any paused printers.

sudo cancel -a `lpstat -t | grep disabled | awk '{print $2}'`
sudo cupsenable `lpstat -t | grep disabled | awk '{print $2}'`

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Performance Optimization WordPress Plugins by W3 EDGE