« They seemed to have heard me | Main | Acrobat 9 Pro for the Mac is out »

Stupid lpadmin tricks with Apple Remote Desktop

Lately at work, I'd been working on getting people off of LPD and PAP onto IPP. IPP provides pap-like functionality, only over TCP/IP, which makes my network traffic simpler. Simpler is good, makes troubleshooting easier.

The potential annoying part was the process I was looking at:

  1. Delete "old" printer via lpadmin -x

  2. Add IPP printer via lpadmin
Admittedly, a two-step process is not hard but I still had to get the existing printer names from CUPS on each machine, blah blah.

Then, rather accidently, on my test machine, (read: John's MacBook Pro), I added a printer via lpadmin with the same name as the existing one, but IPP instead of LPD. Took a look at printers.conf, and realized that I'd just changed the queue type. So now, I had a one step process: Add new printer with same name as existing printer as IPP. So, I set up the command templates in ARD:

lpadmin -p "printername" -v "printer ipp uri" -D "description which is human friendly and used as the 'name' by Mac OS X" -E -P "path to ppd" -o printer-is-shared=false

For some reason, when I add a printer in Mac OS X 10.5 via lpadmin, it likes to set it up as a shared printer, regardless of Printer Sharing state. To prevent that, I use the -o printer-is-shared=false switch.

I realize this is not some earthshattering discovery, but, it gets it into the great Google Tech Support Database, and maybe helps someone save time.

Remember folks, a good sysadmin is a relentlessly lazy sysadmin.


Technorati Tags:
, , ,


Posted by John C. Welch at 12:47 | Permalink


Comments

Great article!

If you are managing many printers or print queues then you may want to look at PrinterSetup.

Posted by: lucidsystems Author Profile Page | May 29, 2008 9:21 PM

"Remember folks, a good sysadmin is a relentlessly lazy sysadmin."

True 'dat. I won big brownie points with a hiring manager years ago when she asked me to list my strengths and I replied that I was "lazy" (I'm a aged sysadmin too). She still chuckles about that.

Sadly, some people don't equate "laziness" with concepts like "efficiency", "prioritization" and "why would I want to do that low-value repetitive task manually when I could write a script for that and focus on something more important?".

The corollary is sysadmins who cloak themselves in techno-arcana, don the pocket-protector vestment, refuse to document things and try vainly to protect their jobs by being the only person on the planet who understands the unnecessarily fragile and unique web of crap that they have smooshed together and called a "system".

Shit, you got me off on a rant there.

Back on topic, good tip with replacing LPD printer defintions with IPP equivalents. Have you experimented with using print queues on OS X server instead of direct printing? Having deployed printers as direct LPD devices (not IPP), I'm thinking of replacing these with print queues on a 10.5 server (our environment is almost 100% Mac).

Posted by: Wrinkle_In_Time Author Profile Page | May 29, 2008 11:03 PM

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?


digital.forest Where Internet solutions grow

 
Family
The Artwork of Melissa Findley
Diane Francis @ the National Post Eric Francis @ the Calgary Sun
Apple Amazon Links
Apple Mac OS X Server 10.5 [Unlimited]

Apple Mac OS X Server 10.5 [10-Client]

Apple Mac OS X 10.5 Leopard

Apple Mac OS X 10.5 Leopard [5-User Family Pack]

Amazon Book Links
Legacy of Ashes: The History of the CIA

The Donnas: Bitchin'

Wizards at War (The Young Wizards, Book 8)

The Demon's Sermon on the Martial Arts

The Collected Stories of Arthur C. Clarke

JavaScript and Ajax for the Web, Sixth Edition

Awakening Warrior: Revolution in the Ethics of Warfare

FOB Links

Mac Web Writers

Techie Links

Review Victims