Posted on 09-28-2014 11:11 PM
Hi,
Hopefully an easy one.
Have followed the steps in the knowledge base article "Packaging Printer Drivers" and have a "final" version that looks like this:
My question is, this is fine for the user "bhfmb1" but how do I make this more general for every OS X 10.9.x user on the network?
I'm also assuming I can remove the Library/logs section and the Saved Application State folder when I distribute it.
I already have pkg files in Casper Admin with the printer drivers but in addition to just deploying the drivers, was hoping to use this to distribute both the configuration and Word presets to all.
Any thoughts?
Regards,
Mark
Posted on 09-29-2014 02:50 AM
Hi Mark,
As with everything, please ensure you test this on a few Macs before rolling out.
My advice:
1) Ditch the "Logs" and "Saved Application State" as you've mentioned above.
2) If it is just the Printer drivers you're after and not the printer queues themselves (which I would recommend followed by pushing the print queues out either by Casper separately or using the command line), then all you need is the PPD files.
3) If you want the files / folders in the "bhfmb1" user to replicate to all users you can either install it to /tmp and script it or, as you're running Casper, build the package as a DMG and use the "Fill user homes (FUT)" option.
4) Again, test it thoroughly first!
Hope that helps!
Darren
Posted on 09-29-2014 06:12 AM
Darren,
In order:
Agreed.
Yes I have the drivers as package in Casper Admin so the idea was to have a policy that:
a. Loaded the packages for the two printers.
b. Followed that up with this one to provide the queues and presets (e.g. duplex, staple, etc.) as opposed to distributing the drivers and then having to visit each machine and create the queues.
Yep I'll make a DMG as you described as this sounds like what I need.
Yep. Have learned that the hard way. :)
Thanks for the help. :)
Posted on 09-29-2014 06:38 AM
@Shearer you can use the lpadmin and lpoptions commands from the terminal to accomplish what you are trying to do via a script. I use these two commands to add printers and set the options on the printers, rather than trying to package up the proper files in Composer.
You can use lpoptions to figure out what options a printer has:
lpoptions -p <printername> -l
Using that command will list out the options for a printer. Then you can use the lpadmin command to add the printer and set the options:
lpadmin -p <printername> -L "Location of printer" -o <options to set> -v <printer que> -P <ppd file to use>
Follow that up with lpoptions to set the options like staple and duplex:
lpoptions -p <printername> -o <options to set>
So, for example, we have a few Xerox 570 machines with Fiery RIPs on them. This is the commands I use to add the printer and set the Output Bin and the High Capacity Tray option:
lpadmin -p Garth -L "17th Floor Copy Room" -E -o printer-is-shared=false -v lpd://X.X.X.X -P /Library/Printers/PPDs/Contents/Resources/en.lproj/Xerox EX 570 Print Server
lpadmin -p Garth -o EFOutputBin=middle
lpadmin -p Garth -o EFOpt_Input_HCFTray=1Tray
So you can have a PKG or DMG file of the printer drivers in the policy, and a script that is set to run After to add the printers. I use a policy to install all printer drivers and then separate policies to add the printers, but that's just how I like to do it here.
Hope all of that helps.
Posted on 09-29-2014 12:31 PM
You're very welcome @Shearer! I hope your experience of the Casper suite has improved!
@stevewood has great details on the scripting of printer queues.
Darren
Posted on 09-29-2014 01:10 PM
Well I'm not sure if Steve's comments help or not (not in a bad way but in that he may have uncovered something I had assumed the use of Composer had already done).
What I'm trying to capture are application specific presets (for use in say Word or Excel, etc.), not telling the OS that printer X has option Y installed.
So perhaps I need to do three things to set a printer up:
Deploy the driver. (which I have covered by a policy)
Tell the OS that printer X has say a stapler as part of its physical setup, replicating what you'd manually do at the OS level in System Preferences when you install the printer, and
Configure the "presets" used once the printer is installed and configured.
I had hoped that the steps in the first post covered 2 and 3 after all that is what the Knowledge Base article is entitled and it doesn't detail any other steps?
Also given that I configured the presets in Word, does that mean I have to include the "Saved Application State"?
As for our experience with the product, well I'm forcing myself to try and use it especially when it should make life easier (i.e. write one policy, rather than visit X machines and do it manually) but the fact that I'm now looking at messing around in the terminal and doing a bunch of stuff not mentioned in the Knowledge Base suggests maybe it won't be.
There comes a tipping point where its less time to give up and just do it manually rather than invest countless hours trying to get the central automated approach to work.
Posted on 09-29-2014 01:31 PM
It would help to know what make/model the printers are so we can have a look at the installers provided by the vendor. So many different ways this can play out.
Posted on 09-29-2014 02:20 PM
Well they are both Sharps (hopefully the names didn't give that away).
One's a MX-M623N, the other a MX-5141N.
I've downloaded the driver installer files from the Sharp site (MXPKXM_OSX109_0314.dmg and MXC26_OSX109_0214.dmg) and setup policies to deploy them.
That part works.
Its the next step (replicating the "adding the printer" step and telling it what extras the device has [of course ideally the OS would interrogate the device] and then configuring all the presets to use at the application level) which is where I'm uncertain and trying to confirm what I've done to date.
Posted on 09-29-2014 02:43 PM
@Shearer I'm sorry, I should have paid closer attention to what you were asking for. You can use Composer to try and scan for the modified files after you set the printer presets and then package those up and deploy. As @daz_dar mentioned earlier, you'll want to create the package as a DMG so that once added to Casper Admin you can check the "Fill User Template" and "Fill Existing User Template".
The presets that you are wanting to set for the applications are held in plist files for each printer. In your screen shot, these would be the two files in the /Users/bhfmb1 preference location:
com.apple.print.custompresets.forprinter.Sharp_Castlereagh_St_on_192_168_1_15.plist
com.apple.print.custompresets.forprinter.Sharp_Elizabeth_St_on_192_168_1_14.plist
If you were to open these files up, you would see the different presets that you want to set for each printer. So knowing that, you can get rid of Saved Application State and the /Library/Logs/DiagnosticReports folder from your Composer scan.
Again, build as a DMG and then do some testing with a machine that has never had these settings applied. Once you've done that, you should be able to deploy to your entire fleet.
I sometimes get lost in finding an automated solution, either through a package or a script, and could typically go touch every machine in less time. However, for me, having an automated way to do things in the future outweighs the time I invest in the script/policy/package.
I sure hope you'll reach out again to the Nation for help, as there are plenty of very knowledgeable folks here that just want to help you succeed.
Posted on 09-30-2014 06:09 PM
OK so just to clarify:
Darren said:
"3) If you want the files / folders in the "bhfmb1" user to replicate to all users you can either install it to /tmp and script it or, as you're running Casper, build the package as a DMG and use the "Fill user homes (FUT)" option."
Steve said:
"you'll want to create the package as a DMG so that once added to Casper Admin you can check the "Fill User Template" and "Fill Existing User Template"."
I have options for:
Fill User Templates (FUT) and/or Fill user existing home directories (FEU)
I do not have an option for:
"Fill Existing User Template".
As Darren's comment is a blending of those two (he mentions "homes" but also FUT) while Steve talks about "Fill Existing User Template" which I don't have.
Which is the right way to go?
I'm tempted to tick both FUT and FEU but would like to get confirmation.
Posted on 09-30-2014 06:16 PM
@Shearer I was going from memory, a spotty one at that. FUT and FEU are correct and you do want to tick both.
Posted on 09-30-2014 06:19 PM
Thanks.
I took a punt and ticked both - will see how it goes.
Thanks again one and all. :-)
Posted on 09-30-2014 06:59 PM
OK moving on to testing.
Used a machine other than the one I ran Composer on.
This machine had received the respective printer driver packages.
Installed the DMG file with both options above ticked (FUT and FEU).
From the screenshot in the first post, the user account has:
- The ppd files in /private/etc/cups/ppd
- The Preferences in /library/preferences
It does not have the two printers listed in /library/printers
Any ideas as to what has gone astray?
Posted on 09-30-2014 07:11 PM
None of your posts mention uploading the configured printer to JSS using Casper Admin? If you have the driver PKGs, that takes care of the driver. Casper Admin handles getting the printer into everyone's Printers list. Pushing presets via plist files...well thats something Apple is trying to get us to move away from.
Posted on 09-30-2014 07:18 PM
"None of your posts mention uploading the configured printer to JSS using Casper Admin?"
Isn't that what I did with the DMG file I created?
I added that to Casper Admin (where I had to select FUT and FEU). I indexed and saved.
I then created a policy to push that DMG file out to the test machine.
What else am I supposed to do with JSS / Casper Admin???
AFAIK I've followed all the steps in the "Packaging Printer Drivers" Knowledge Base article.
Posted on 09-30-2014 07:25 PM
Do you have an available Mac with Casper Suite tools installed, and at least one printer in the Printers & Scanners list?
Launch Casper Admin and look for the Add Printers icon along the top.
It's all in the Casper Admin guide. The JAMF articles are great, but they're not the first place to look.
Posted on 09-30-2014 07:27 PM
@Shearer yes, you have followed all of the steps for packaging the drivers, but you still haven't deployed the actual printers. Deploying printers is a two part process: deploy the drivers and then deploy the actual printers.
You can deploy the actual printers themselves by either adding them to Casper Admin from a machine that has them, or use the lpadmin command that I had mentioned earlier in this thread.
And the test is not whether the printers show up in /Library/Printers, it's whether they show up in /etc/cups/printers.conf. The first location is simply where the drivers will live, while the second is the actual information for connecting to the printers.
You can get more information about adding them through Casper Admin by checking out pages 313 through 319 in the Casper Admin guide.
Posted on 09-30-2014 07:33 PM
Casper Admin guide <-- Hopefully the name doesn't give it away. :)
Posted on 09-30-2014 07:33 PM
OK I'll start going through that too.
BTW 313 - 319 is all about FileVault and Passwords so I guess I'll just look for printers.
Posted on 09-30-2014 07:34 PM
@Shearer][/url The actual pages depend on the JSS version you're on. Look for "Managing Printers" in the Casper Admin guide...
http://www.jamfsoftware.com/resources/resources-casper-suite/administrator-guides/
Posted on 09-30-2014 07:57 PM
OK.
Found it (page 283 of the 9.32 Guide).
Have added the printers to Casper Admin.
Changed the ppd from "Genric" and edited the path to the ppd file to match what I have in Composer.
Will see how one goes and then set up the second.
Posted on 09-30-2014 08:37 PM
OK first one pushed out.
It appears in the Printers and Scanners System Preference.
For some reason it had "sharing" on (even though it wasn't shared in either the Composer session or when it was added to JSS).
When I open the queue it tells me the "software was installed incorrectly" and offers to repair it.
The physical options (number of trays, punch, stapler, etc.) are correct.
When I start Word it has a hazard triangle next to it (triangle with a "!" within) and none of the presets (duplex, staple, punch, etc.) are there.
If I go back and opt to "repair" the installation, it tells me it is repairing permissions.
Then if I re launch Word the "hazard" has gone but still no presets.
So a bunch of questions.
Why would sharing be "on" / how do I ensure its "off"?
Why would it need to be repaired?
Why no presets in Word?
Posted on 10-02-2014 02:28 PM
(1) Because Apple assumes you want it on, so it's on by default.
Policy > Options > Files and Processes > Execute Command
lpadmin -p ALL -o printer-is-shared="False"
This should disable sharing for all the users' printers.
Subsitute "ALL" for the printer name if you want to target just that printer.
(2) Snapshots aren't always a good idea.
(3) Printer presets are usually stored in *.plist files, and Apple is trying to get us to stop pushing these files. Using defaults commands is better if it's possible (isn't always), but then you've got to deal with preferences caching (killall cfprefsd). We usally write up instructions for end users so they can set their own printer presets.
Posted on 10-07-2014 05:02 PM
Guys,
Thanks for the responses (sorry been away so forgive the delay).
I think I'll do a bulk install of the printers, turn off the sharing and then use Remote to setup the *.plist files (I need to do one personally as it is [uses a machine unique access code] so setting the others up isn't too much more.
Regards.