Skip to main content

Hello nice people!

I'm currently testing deploying printers using Casper, but I'm having a couple of issues.

Deploying printers added by Casper Admin = "Hold for Authentication"

Using the command line = "Printer Paused"

Error logs shows: E [14/May/2015:10:23:35 -0500] [Job 5] Connection refused)

Command I'm using:

/usr/sbin/lpadmin -p "name of printer" -E -v smb://printerserver-forIT.mydomain.com -P /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Resources/Generic.ppd

and

/usr/sbin/lpadmin -p "nameof-IT printer" -E -v smb://printserver-namehere -P /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Resources/Generic.ppd

These are network printers hosted on Windows Server 2012R2. Can someone shed some light on what I'm doing wrong?

Am I the only that thought: "The same way girls do". Sorry, I just found it funny! In any event glad to know you've for a handle on this.


Hi I refined @lwindram's script. It now uses script parameters from the JSS.

GitHub Gist

#!/bin/bash

# Original: https://jamfnation.jamfsoftware.com/discussion.html?id=14467
# Useful script for deploying printers in a Casper Environment
# Originally by Lwindram on JAMF Nation forums
# https://jamfnation.jamfsoftware.com/viewProfile.html?userID=11026
# Edited to use JSS Script Parameters to make the script portable to all Models. Define $vars in JSS Policy.

# Variables

# PPD = $4 in JSS
ppd=$4

# CUPS Name = $5 in JSS
cupsName=$5

# Display Name = $6 in JSS
humanName=$6

# IP Address and Protocol = $7 in JSS
# Be sure to add the protocol in the paramters!
ip=$7

# Building Location = $8 in JSS
bldg=$8

# Duplex = $9 in JSS
duplex=$9

# Finisher = $10 in JSS
finisher=${10}

# $11
# var=${11}

# Script

lpadmin -p $cupsName -v $ip -D "$humanName" -L "$bldg" -m "$ppd" -E -o printer-is-shared=false -o Duplex="$duplex" -o PageSize=Letter -o Finisher="$finisher"

# man lpadmin
# -p = Named printer or class
# -v = device URI
# -D = textual description of destination
# -L = location of destination
# -m = model (ppd)
# -E (at end) enables device

# CUPS Options
# man lptoptions
# -o printer-is-shared=false disables sharing
# -o Duplex=None disables two-sided printing 
# -o Duplex=DuplexNoTumble enables two-sided printing long edge
# -o Duplex=DuplexTumble enables two-sided printing short edge

# Printer has Large Capacity Tray
# lpadmin -p $cupsName -o LargeCapacityTray=Installed

# Finishing options
# Finisher/Finisher: 
# NotInstalled 
# FinRUBICONB 
# FinVOLGABBK 
# FinVOLGAB 
# FinAMURBK 
# FinAMUR  = Finisher SR3140
# FinEUPHRATESE 
# FinKINGB
# lpadmin -p $cupsName -o Finisher=$finisher

exit

I took out the bottom portion as I'm still working out the model specifics. Our environment is pretty homogenous when it comes to printers, so the CUPS settings should be fairly straightforward. I deploy this through a Self Service policy. I'll keep updating the Gist as I add more options, but a bit of DDG'ing and reading the lpoptions -p $printername -l helps a ton!


@ndelgrande2 @Aziz I am trying to deploy the InstallUniflowMacClient.dmg. What are the steps you followed in your process to create the deployment package.


@Aziz, do you mind elaborate what you did with the HP Jet Direct? You mention of chooisng the correct protol. However, what do you enter under "Device URI"?

I cannot get IPP to work on one of the newer Xerox. It will keep say ready to print.

Update: nevermind, I figured to define a different protocol, just specified in Device URI. Example, instead of ipp://youripaddress, it would be socket://youripaddress, or ldp://youripaddress