What's the best way to create an OS X Print Server?

I work in an environment where we have around 200 macs and about 12 printers spread out in different parts of the building. We currently set up printing by IP address from each individual Mac to whichever printer(s) that the user will require. It may be obvious why this method is flawed, but the summary is that it is difficult for users to add printers and when there's a problem, we have to go hunting to see which computer is the holdup. We do have a couple of Mavericks servers running and I've been trying to suss out a way to use these for serving printers also. We don't need any special features, other than just having a single address to send jobs to that can dish out the jobs to each printer queue as required. That and we'd like to have the users easily be able to add printers as needed, preferably by selecting from a list and having it install automatically. To make matters a little more complicated, we have 2 subnets, each with different levels of access, so broadcasting Bonjour can be a challenge. I know on a Windows Print Server, users just type in the address of the server and it presents them with a list of printers to choose from. This would be ideal, but we really, really, really don't want to use a Windows server and would prefer an OS X option instead.


Thank you for any support you may offer.

Mac mini, OS X Server, OS X 10.9.4 with Server 3.1.2 running on a Mac mini

Posted on Oct 24, 2014 8:47 AM

Reply
10 replies

Oct 24, 2014 10:27 AM in response to atoss

So you have two basic goals here. Success with one may negate the other. They are to create a print server presumably with a follow me type technology to release the job when the user walks up to a printer. And the second is to allow users to more easily add printers. Let's look at both and then dig a little deeper.


If you are looking for a print server and you want to run it on Mac, look at PaperCut NG and PaperCut MF. The basic difference is that NG is a print server and you can set it up yourself. MF requires integrator assistance as you are adding hardware to each printer to allow a "follow me" printing approach. This means that everyone just prints. They don't need to know anything about the printer, they just print. Then they walk up to the nearest printer, identify themselves, and then the page prints. This can reduce waste, increase privacy, and limit printing (people are lazy, they don't want to get up and get the print out). However, this does not work well for specialized printers like large format printers. if you have a bunch of generic general office printers you will likely be fine.


Now if the first goal works, then there is no need for the second goal. However, if you are not able to implement a print server and you want to focus on the ability of users to add printers, then I have some thoughts. First, you say you have 200 macs. That is a really nice size environment. If this is the case, what are you using for management? If JAMF's Casper Suite, then look no further than Self Service. I tend to create a Printers category and add all printers to the self service tab. Now any user, from any rights level, can add that printer when needed. If you do not have JAMF, do you have any skill with AppleScript? If so, you can make a very simple application that can create printers for the users. The script is backed with the lpadmin command. You first start with creating one printer at a time on a control machine. Use lpoptions -l to identify the settings. For example:


...

SetPageDevice/SetPageDevice: *SetPageDevice

XRTrays/Paper Trays: TwoTrays *ThreeTrays

XRJobStorage/Job Storage Module: False HardDrive *RAMDisk

XRDuplexUnit/Duplex Module: *True

XRJobType/Job Type: *Normal Secure Save

XRSaveContext/XRSaveContext: *Public

XRSaveJobDisposition/Saved Job Title: *Save

GlossyLightCard GlossyHeavyCard Labels Envelope Other ColoredPlain *Auto

InputSlot/Paper Trays: *Tray1 Tray2 Bypass

...


Then you can craft an lpadmin command to add the printer:


lpadmin -p Xerox6605 -E -v lpd://172.16.0.12 -P /Library/Printers/PPDs/Contents/Resources/Xerox\ WorkCentre\ 6605DN.gz -o XRTrays=TwoTrays -o XRJobStorage=HardDrive -o XRDuplexUnit=True -o printer-is-shared=false


Ah, but OS X will deny standard users the ability to add printers via command line. If you have already having issues with printers being paused and you must run around to un-pause, then you might want to consider allowing the users to admin the printer subsystem. For example, in an AD environment, you could use something like:


sudo dseditgroup -o edit -n /Local/Default -u localadmin -p -a “Domain Users” -t group _lpadmin


This adds the AD group Domain Users not the _lpadmin group. If no AD, you can use:


sudo dseditgroup -o edit -n /Local/Default -u localadmin -p -a “staff” -t group _lpadmin


Then using lpadmin is permitted by standard users. Craft an lpadmin command for each of your printers and build a simple Printer Management app. Now all users can simply launch a local app and add printers as needed. If you need to update your App, push it out over ARD.


So once again, either of these can solve your issues. Implementing the print server may negate the need to provide an easy way to add printers. Providing an easy want to add printers may negate the need to implement a print server.


Reid

Apple Consultants Network

Author "Mavericks Server – Foundation Services" :: Exclusively available in Apple's iBooks Store

Author "Mavericks Server – Control and Collaboration" :: Exclusively available in Apple's iBooks Store

Oct 24, 2014 12:04 PM in response to Strontium90

Thank you very much for your very involved and descriptive reply.


The "Follow Me" approach is very nice... but completely unnecessary for our needs, though it did give me pause. That said, the scripting had also occurred to me as possibility, but it only addressed the ease of use for the end-users, not necessarily the printing service that I was seeking. We do not use Casper here, though if it were up to me and I were starting from scratch, I absolutely would. I have also investigated PaperCut and have installed the demo. It seems to be bloated with a lot of features that we'll never need and can't justify the cost.


It seems to me that there should be a simple means to configure a Mac OS X Server to host printers and have clients print to the server with assigned queues. This would provide one central location for all the print jobs to process, which would improve troubleshooting as well as free up the clients from direct communication with the printers. It would seem that Snow Leopard Server once offered a Print service which was discontinued at the time of the release of Lion Server. Since then, I can't see that anyone has come up with a good and simple resolution to the lack of a simple Print service in OS X Server. I spent a long time looking at CUPS Administration to see if there was anything there, but it doesn't seem to do much more than enable printer sharing in System Preferences (which is technically vice versa, I know).


So, any additional advice would be very much appreciated.

Oct 24, 2014 3:20 PM in response to atoss

It seems to me that there should be a simple means to configure a Mac OS X Server to host printers and have clients print to the server with assigned queues...but it doesn't seem to do much more than enable printer sharing in System Preferences


You summed it up. Apple did make if simple. Define all the printers on the server and share them. Point the clients at the shared printers. That is basically the solution.

Oct 27, 2014 5:16 AM in response to Strontium90

Sadly, it's not quite as simple as that. I have been attempting to use Apple's built-in printer sharing as my print server solution, even adjusting settings within CUPS, but it does not appear to accomplish the task. Firstly, this method does not seem to utilize a print service, as the client still spends a long time sending the job to and negotiating directly with the printer. The idea of a print server allows the client to shoot off the job to the server and the server does the heavy lifting of getting the jobs to the appropriate printers. Secondly, it broadcasts via Bonjour, which does not jump subnets. Even when I have "Allow printing from Internet" checked, the clients don't see the printers being advertised. Not that they need to be advertised. If I could add these shared printers to the clients using an address and a queue, this would be fine too, but, as far as I can tell, adding the name of the server as the address and the name of the printer to the queue does not work to allow printing to these shared printers. Printers are only successfully set up this way when they are being advertised as "Bonjour Shared" from the "Default" pane.

So, I'm still at a loss. I can't seem to get a Mac OS X printer server set up. I'm really surprised that one one has come up with simple Printer Server software. CUPS Administration even has a section for "Server" which I found to be incredibly promising, but it just doesn't seem to do anything at all. If I check the "Share printers connected to this system" box, printers that are not being shared from the Sharing preferences are still not being shared (even on the same subnet). If I share a printer from the Sharing preferences and uncheck that same box in CUPS, the printer is still being shared. I just can't tell if that checkbox actually does anything at all.


Guess I'll just have to keep searching. Maybe I can setup a Linux print server. Ugh. I am very thankful for your engagement with me on this topic, though.

Oct 28, 2014 4:18 AM in response to atoss

I have to say that the whole area of providing a printer server, pushing out drivers and settings for printer, etc. is one in which (ironically) the Mac is far inferior to Windows and this dates all the way back to Windows NT Server! In fact last year I was working at a Government department and they still used a Window server for managing print queues for Mac clients specifically for this and did not use Windows servers for anything else. (It is ironic because of the Macs history in the Desktop Publishing arena.)


You could like they did run a basic Windows server in a virtual machine to do this.


Sadly 😟 this is all symptomatic of Apple's focus on consumer level customers and mostly ignoring enterprise requirements from a server perspective. (The Mac can be a decent client to a server e.g. the above mentioned Windows server for print queues but is useless at being a print server using Apple's own software.)


There are various suggested approaches for using scripts etc. to push out settings to Mac clients like those mentioned by Strontium90 also see https://github.com/henri/printer-setup and https://code.google.com/p/munki/wiki/ManagingPrintersWithMunki but compared to (shock, horror!) the simplicity of a Windows print server they make my head ache.

Oct 28, 2014 5:17 AM in response to atoss

I have one other possible suggestion. Have you enabled the LPD daemon to allow configuration other than Bonjour?


If you edit /etc/cups/cups-files.conf, there is a line in there that you can uncomment:


#LPDConfigFile launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist

Remove the # from the start of the line. Then, when CUPS starts, it will run the /System/Library/LaunchDaemons/org.cups.cups-lpd.plist LaunchDaemon.

If you want to just test this, you can try to run:

sudo launchctl load /System/Library/LaunchDaemons/org.cups.cups-lpd.plist

This will spawn the LPD listener. Then from the Mac client you configure the print queues using IP address and the server becomes the "printer." I will enable this on all PaperCut deployments because the Bonjour stuff is great at home with one printer but falls apart in companies with complex networks.


I have to say that the whole area of providing a printer server, pushing out drivers and settings for printer, etc. is one in which (ironically) the Mac is far inferior to Windows


Ah, memories, huh John. Remember the days of Open Directory printers. How far we have fallen.

Reid

Apple Consultants Network

Author "Mavericks Server – Foundation Services" :: Exclusively available in Apple's iBooks Store

Author "Mavericks Server – Control and Collaboration" :: Exclusively available in Apple's iBooks Store

Oct 28, 2014 10:36 AM in response to atoss

Unfortunately, I'm still not printing successfully using the set up as described. I found the file at /etc/cups/cups-files.conf and edited out the # from LPDConfigFile launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist, restarted CUPS and was still not able to print via LPD to the printer. Also, when I ran the command sudo launchctl load /System/Library/LaunchDaemons/org.cups.cups-lpd.plist, it responded with "nothing found to load." I did visually verify the existence of the file and these issues still persist after reboot of the server. So, I'm currently able to share the printer from the server and set up the printer on the client using LPD using the address of the server with port 631 appended and the name of the printer as the Queue name. This all sets up successfully. When attempting to print from the client, it never passes the job on to the server. The job hangs on "Copying print data" for a bit and then the printer pauses with a message "Ready to Print." Resuming the job starts the process over again and pauses back on "Ready to Print."


Thoughts?

Oct 28, 2014 7:13 PM in response to atoss

I may need a day or two before I get back to the lab. That trick works like a champ when deploying PaperCut. Looking back in notes shows that is the only time I've used it. You have me curious but I need time to get to the playground. The only thing I know is I've never defined the port number in the address. Selecting IP from the Add printer window and then setting the Protocol to Line Printer Daemon is all I ever do. In the address, use the IP or FQHN of the server. The queue should be the printer name. Pulling this from memory at the moment.

Oct 31, 2014 8:56 AM in response to atoss

Well, I still haven't come up with the solution that I wanted for a print server, but I have come up with a fantastic solution using scripts for end-user ease-of-use. It turns out that my quest for a Mac print server has led us to PrinterLogic, which is now being investigated by our whole organization for printer management, not just the Macs. So, I'm putting a server on hold and now I'm deploying these scripts on a share called "macprint" which is guest accessible. When a user logs in as guest, they're presented with a window filled with various printer AppleScript applications named "Add Printer_Name." They double click on the app and seconds later the printer is installed on their Mac. Here's the script:


set pName to "name-of-printer"set pDescription to "'Name of Printer that Users See'"set pAddress to "lpd://172.X.X.X"set pLocation to "'The Place the Printer Lives'"set pDriver to quoted form of "/Library/Printers/PPDs/Contents/Resources/PPD_FILE.gz"

try do shell script "lpadmin -p " & pName & " -v " & pAddress & " -E -D " & pDescription & " -L " & pLocation & " -m " & pDriver & " -o printer-is- shared=false"

display dialog "This printer has been successfully added to your Mac!" buttons {"Open Printer Preferences", "OK"} default button "OK" with icon note

if button returned of result is "Open Printer Preferences" then

tell application "System Preferences"

set current pane to pane "com.apple.preference.printfax"

activate

end tell

end if

on error

display dialog "I'm sorry, I'm unable to install this printer for you. The appropriate printer driver was not found on your Mac."

end try



I love this script and I can't believe how easy it was to write! I have 18 of these scripts set up and, so far, the reactions are very positive!


Thank you for all your help getting me this far!

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.

What's the best way to create an OS X Print Server?

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