Publish PDF through Self Service for specific computer groups or AD group

jmercier
Contributor II

Hi...

is it possible to publish through self service certain amount of pdf files like procedure.... for specific computer group or active directory group ?

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

It can be done a couple of different ways.

1 - Host the PDF file on an internal web server, if you have one that you can use. Once set up and tested, create a Self Service URL plug-in in the JSS that uses the URL for the linked PDF. Normally these apply to all Macs, so you'll need to follow JAMF's kb article here on deploying Self Service plug-ins to only select Macs.
https://jamfnation.jamfsoftware.com/article.html?id=177
You can use the "Assign to specific User Groups" option in the Scope tab of a policy to deploy the wrapped up plug-in to only the Macs you want to get it.
Advantage: You can update the PDF on the server side whenever you want and it will always be current when users view it in Self Service.
Disadvantage: It needs to be hosted on a valid web server. Not hard to do, but it depends on what resources you have.

2 - You can also just wrap up the PDF itself in a DMG that would deploy to user's home directories with the FUT/FEU options, maybe into their Documents or Desktop folder for example, and then use the same options in the policy as above to scope it to the appropriate Mac users.

Note that its not so easy to target computer groups from LDAP. User groups is easy, but the JSS doesn't have anything built in to target computer groups outside of the ones on the JSS, like Smart and Static Groups, so for LDAP computer groups that you'd need to build an Extension Attribute that would grab the computer groups for each Mac against your LDAP environment as one possible solution.

View solution in original post

6 REPLIES 6

mm2270
Legendary Contributor III

It can be done a couple of different ways.

1 - Host the PDF file on an internal web server, if you have one that you can use. Once set up and tested, create a Self Service URL plug-in in the JSS that uses the URL for the linked PDF. Normally these apply to all Macs, so you'll need to follow JAMF's kb article here on deploying Self Service plug-ins to only select Macs.
https://jamfnation.jamfsoftware.com/article.html?id=177
You can use the "Assign to specific User Groups" option in the Scope tab of a policy to deploy the wrapped up plug-in to only the Macs you want to get it.
Advantage: You can update the PDF on the server side whenever you want and it will always be current when users view it in Self Service.
Disadvantage: It needs to be hosted on a valid web server. Not hard to do, but it depends on what resources you have.

2 - You can also just wrap up the PDF itself in a DMG that would deploy to user's home directories with the FUT/FEU options, maybe into their Documents or Desktop folder for example, and then use the same options in the policy as above to scope it to the appropriate Mac users.

Note that its not so easy to target computer groups from LDAP. User groups is easy, but the JSS doesn't have anything built in to target computer groups outside of the ones on the JSS, like Smart and Static Groups, so for LDAP computer groups that you'd need to build an Extension Attribute that would grab the computer groups for each Mac against your LDAP environment as one possible solution.

jmercier
Contributor II

thanks... but here's what i wish....

user from computer... OR mobile device... login in to self service... and only then they have access to those pdf files... i don't want the pdf to show up in plugin... i will have 20-30 pdf to share...

mm2270
Legendary Contributor III

Then you might want to speak to someone in your department who can put up a very simple web server hosting all the PDFs you plan on giving users (if that isn't you that is). Doesn't have to be fancy. Just a basic page with some links to the PDFs. i use to do something like this years back on old versions of OS X Server. Its still of course possible to do that today, and far easier than what i use to have to wrangle through in the past.

Then use the above method from the KB article to create and deploy a Self Service plug-in to that main page with all the PDFs you want to host. That way its a single link from Self Service and not dozens.

Self Service itself cannot display PDF files inline outside of the plug-in interface. It doesn't even do basic html anymore since that was removed several versions ago. I don't know if there's any other way to get what you're looking for from SS. Especially if you want them to view these from an iOS device. The single page with multiple PDFs will probably be your best bet, unless someone has a better idea.

alexjdale
Valued Contributor III

On the topic of the DMG method, I'm looking for a way to deploy a DMG in Self Service that will mount and display the contents when the policy is run. Has anyone done that?

We have a couple custom apps that only our technicians should have access to, and I want to make sure they always use the latest version so I was thinking of this as a deployment method. It would also work for PDFs, though.

mm2270
Legendary Contributor III

@alexjdale][/url][/url][/url, what i would do is wrap the DMG itself into a package installer that dropped the DMG into a specific location, then have a post install script in the pkg that would use hdiutil to mount the DMG and open the contents in the Finder.

Here's an example script you can try out. You just need to put the proper path in the below to where the DMG file would get deployed to.

#!/bin/sh

MountPoint=$(echo $(hdiutil attach "/path/to/dmg/Application.dmg" 2>&1 | awk -F"/" '/Volumes/{print $NF}'))

open "/Volumes/$MountPoint/"

The open command may not work when done via a policy. Not sure, but since its running as root, you may get an error. If so, you can try doing the command as the user, or using some Applescript commands to open it in Finder, etc.

alexjdale
Valued Contributor III

Thanks, I had the mounting and pkg working but wanted to avoid osascript for opening it in Finder if I could, I'll test out the open command and maybe sudo it as the user if I have to.