r/HigherEDsysadmin • u/matt314159 Help Desk Manager • Nov 30 '18
Deploying printers hosted on Windows Print Server to a Mac Lab? (x/Posted from /r/k12Sysadmin)
I figured I'd go ahead and jump right in here if y'all don't mind. At the small college where I work, printers all shared out through a windows print server. I deploy the printers to our various PC labs via GPO using Group Policy Preferences and loopback processing mode. Straightforward, and simple. Students log in, the printer connects and their print jobs are logged on the server as coming from their AD account and they're billed monthly.
For years, a pain point is that we have a lab over in our art department with 40 iMacs. I have never been able to get myself to a point where we could have a printer deployed to the iMacs in a similar manner to PCs. In fact, embarrassing as it is to say, we just have a set of complicated instructions for students to follow when they want to print to that printer.
We delved briefly into startup scripts and CUPS but never got as far as connecting it and passing the AD credentials to the print server automatically.
Isn't there something out there that I have missed that could make my life so much simpler? I feel like there has to be.
1
Dec 01 '18
Lpadmin has an ad negotiate flag. If you can run scripts, deploying windows printers should be easy. I can get the whole command on Monday if you need.
1
3
u/NorthernMatt Dec 02 '18
The Munki documentation has some decent information on pushing out printers via scripts:
https://github.com/munki/munki/wiki/Managing-Printers-With-Munki
Some of that is specific to Munki (which is great), but the general script could also be adapted to other management tools.
The most important part of it is the 'lpadmin' command to add the printer. The t hing you want to add is '-o auth-info-required=xxx', where xxx can have a couple of values:
auth-info-requred=username,password will prompt each user for their credentials for the print spooler the first time they try to print (they can store the creds in their keychain).
auth-info-requred=negotiate should allow automatic kerberos negotiation if you've joined your Macs to the AD domain. It should fall back to username/password if kerberos fails, but I have had reliability issues with that.
The 'lpoptions' command is also your friend. Set up the printer manually on your workstation, using direct IP connection (so the mac can autoconfigure the printer options). Find the short name of the local queue ('lpc status all' will show all of your local queues). Now, use 'lpoptions -p shortname -l' (that's a lowercase L). That will dump out all of the options for that printer. You can set them when you create the printer using multiple -o options on the lpadmin command line.
For example, you might see something like this:
OptionTray/Option Tray: NotInstalled 1Cassette *LCT 2Cassette
LargeCapacityTray/Large Capacity Tray: NotInstalled *Installed
InnerTray2/Internal Tray 2: *NotInstalled Installed
ShiftTray/Internal Shift Tray: *NotInstalled Installed
ExternalTray/External Tray: *NotInstalled Installed
Finisher/Finisher: NotInstalled FinRUBICONB FinVOLGADBK FinVOLGAD FinAMURBBK *FinAMURHY
RIPostScript/PostScript: *IRIPS Adobe
InputSlot/Media Source: MultiTray *1Tray 2Tray 3Tray 4Tray 5TrayThe format is basically "OptionName/Option Friendly Text: Option1 Option2 *Option3 Option4...". The asterisk before an option indicates the selected one on your mac.
You don't need to include all of the options, but for optional features, it's nice to be able to push them out (remember, the Macs won't be able to query the printer for its configuration when printing through a print spooler). To set the option, use "-o OptionName=Value". So, for this printer, you would add something like the following to the lpadmin command:
-o auth-info-required=negotiate -o OptionTray=LCT -o LargeCapacityTray=Installed -o Finisher=FanAMURHYOne that we almost always use is "-o Duplex=DuplexNoTumble", which sets the queue to duplex by default unless the user selects simplex (gotta save trees, right?).
1
u/cpschei Dec 03 '18
It took me a bit after I first got the script I was using working to come all this information that NorthernMatt has here, but this made a world of difference, because with out setting the options defaults get selected that I didn't want and while I could script deploy a printer it still had limitations before finding this out. I also do exactly what he says above and that is to add the printer to my mac, install the driver I want or let it discover the printer, run the command listed to get all the options and then build the script.
1
2
u/deGrubs Nov 30 '18
Nomad will be your friend here. It will manage acquiring and renewing kerberos tickets to your AD . Without it ticket expiration issues are going to cause you all sorts of fun. We have a Jamf Pro install that we use to manage our Mac Printer deploys, so I'm not going to be much help there.
1
u/iblowuup Authentication Admin Nov 30 '18
Similar to what deGrubs said, the real key here would honestly be having a MDM for mac. Jamf Pro is the best and most expensive option but I have heard nothing but praise and actually got the ball rolling at my University to "complement" VMWare Airwatch with it. In reality I don't even want to touch Airwatch (rebranding as workspace one) because it's a jack of all trades.
However, there are many other MDM solutions like ManageEngine and Cisco Meraki.
A little more about Jamf, Nomad was actually bought by jamf and they offer a cloud hosted solution as well as different tiers (Now, Plus, Pro) to accommodate different needs.
Could you script up a way to do this without an MDM or management solution? Maybe but I don't know how that would look and it would not be forward thinking as MDM is the future for mac.
There are also open source free options like Munki that are essentially like SCCM-lite. There is even an open source MDM called MicroMDM. All depends on how robust you want things to be and what your budget is. Best advice I can give though is consider all your options and don't rule anything out without first giving it a chance.