Printer Setup

mpermann
Valued Contributor II

We've been using using Casper Admin to capture and add our printers to our JSS for deployment to staff through Self Service. For the most part this has worked fine. Prior to that staff would manually add printers via IP Printing using the lpd protocol and manually set the installable options. But sometimes staff didn't get the installable options properly configured so device specific features wouldn't always work. That's why we decided to use the JSS to ensure printers were consistently named and setup.

Recently, we have run into some odd issues which has made me rethink this approach. After reading through various posts in JAMF Nation, I've seen some folks are using the lpadmin command to setup printers through scripts. Our fleet of printers is mostly HP LaserJets and some Ricoh and Konica Minolta MFPs. I've been creating and testing lpadmin commands with our printers using the lpd protocol. In the CUPS documentation on using network printers it suggests not using lpd and using a different protocol (AppSocket or IPP) if available on the printer.

My question to the nation is, what protocol are you using and how are you setting up your network-based printers and why did you choose that protocol/method? We've been using the lpd protocol for years and it's worked very reliably with few issues, so I am hesitant to switch to something different. But I know things change and improve so I'm certainly open to trying something new. Soon we will be replacing all of our old fleet of HP LaserJets (9 different models) with new HP LaserJet Enterprise 600 M601 series printers so I thought now would be a good time to possibly try a new protocol. Our computers are mostly laptops running Mac OS 10.6 through 10.9 and we don't use or bind to AD. All accounts are local accounts with end user having admin permissions. We're not looking to add or use a print server. We just want staff to be able to reliably print directly to the print devices. Thanks in advance for any suggestions and information you're willing to provide.

7 REPLIES 7

austed
New Contributor II

I use Composer to build packages that load the PPDs and then a postinstall script installs the printer with the lpadmin command. I use LPR because it has worked for years, very reliably. I figure if it's not broken why fix it? Our printers range from Ricoh, HP, and Dell.

mpermann
Valued Contributor II

@austed, thanks for your response. It's nice to know I'm not the only one still using LPR/LPD.

RobertHammen
Valued Contributor II

Try JetDirect first, before LPD, even on non-HP printers (many of them support JetDirect). JetDirect is a bidirectional protocol and it allows CUPS on the Mac to query the printer for its specific options. LPD should be your last resort...

austed
New Contributor II

We use LPR because we connect to printers through a Windows print server. I don't think you can use HP JetDirect on OSX when you're connecting through a Windows print server, unless I'm mistaken.

jkuo
Contributor

We use lpadmin to add printers, as it allows you to set all the options right from the start. If users have an issue, you can have them reinstall the package from self-service to reset their printers, and you can even put a command right in the front to delete all the old printers and try it again.

You can also ensure that the user has all the correct drivers installed, and wrap it up in the package. Here's an example of how I do this - using Apple Package Maker, I first plop the .zip file with the driver installer into /Users/Shared, unzip it, mount it, and the run the installer. (This first example is using some Canon drivers, and the second part is for an HP printer, but you can get the idea).

sudo unzip /Users/Shared/UFRII_v10.4.0_Mac.zip -d /Users/Shared
sudo hdiutil attach /Users/Shared/UFRII_v10.4.0_Mac.dmg
sudo installer -verbose -pkg "/Volumes/UFRII_v10.4.0_Mac/UFRII_LT_LIPS_LX_Installer.pkg" -target /
sudo rm /Users/Shared/UFRII_v10.4.0_Mac.zip
sudo hdiutil detach "/Volumes/UFRII_v10.4.0_Mac"
sudo rm /Users/Shared/UFRII_v10.4.0_Mac.dmg
sudo rm -r /Users/Shared/__MACOSX

Next, I run lpadmin to add the printer:

/usr/sbin/lpadmin -p "HPLaserJetP4015" -E -v lpd://"10.5.5.5"/ -P "/Library/Printers/PPDs/Contents/Resources/HP LaserJet P4010_P4510 Series.gz" -D "HP LaserJet P4015" -o printer-is-shared=false -o HPOption_Duplexer=true -o HPOption_Disk=true -L "Printer Station"

You can get all those proper -o options beforehand by installing the printer manually on a computer, and then running:

lpoptions -p HPLaserJetP4015 -l

If you want to do the thing where i mentioned above to delete a printer before starting, you can just do:

lpadmin -x "HPLaserJetP4015"

msample
Contributor II

@jkuoThis was a great post. Ran it in a workflow today to help installing Canon drivers into an El Capitan image and it worked seamlessly.

jkuo
Contributor

@msample Glad it was helpful!