Adding many printers via lpadmin

I need to add a few hundred printer configs on my Xserve (10.5.8), once, and I'd prefer to manipulate a spreadsheet to create a script, rather than clicking through the add printer GUI for hours.

Anyway the lpadmin command works great to add one printer, but when I combine several lines in a script, I only get the last printer in the script added. I see no add or append options in the man pages.

Here's what I'm working with so far:

/usr/sbin/lpadmin -p print.server.com -E -v lpd://print.server.com/queue_name -P /Library/Printers/PPDs/Contents/Resources/Lexmark\ T644.gz -D printer_name

Can anyone advise what I'm missing?

thanks so much,
Darrin

10.5.8

Posted on Jan 11, 2010 10:38 AM

Reply
4 replies

Jan 14, 2010 4:42 AM in response to Nils C. Anderson

My command works just fine when run singularly.

Problem is, if I write a few more lines, but define different printers, and wrap that up in a shell script; when it runs, I only get the last defined printer. Each time the command runs, it overwrites the results of the last line.

I need some sort of syntax to add or append, but don't see that option in the man pages.

Jan 20, 2010 8:33 AM in response to DPert

I got the answer elsewhere, so for the archive...

I thought I needed the -p option to reference my print server. No. This should actually be the printer/queue name. That also negates the need for the -D option. So the correct syntax is:

/usr/sbin/lpadmin -p printer_name -E -v lpd://print.server.com/queue_name -P /Library/Printers/PPDs/Contents/Resources/Lexmark\ T644.gz

Darrin

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Adding many printers via lpadmin

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.