Home > Casper, Mac administration, Mac OS X, macOS, Scripting > Providing website links via Casper Self Service policies

Providing website links via Casper Self Service policies

It’s often useful to provide a way for everyone in your shop to be able to look up commonly used websites. Methods I’ve seen of doing this include:

  • Wiki pages
  • Bookmarks deployed to browsers
  • Browser extensions

Another method is to use Casper’s Self Service plug-ins feature.

Screen Shot 2016 11 10 at 9 57 09 AM

Screen Shot 2016 11 10 at 9 56 55 AM

This makes it easy to set up website bookmarks, which then appear in a sidebar of Self Service.

Self Service URL plug in

The main drawback to this method is you can’t scope these bookmarks to appear only to certain users or computers. These will appear on on all managed computers and to all users. If you need to have one set of bookmarks available to Group A in your organization, and a different set of bookmarks appearing to Group B, the Self Service plug-ins feature may not be the best solution.

Fortunately, you can solve this scoping issue using Casper policies and Self Service. For more details, see below the jump.

To help address this issue in my own shop, I wanted to be able to do the following:

  1. Provide a way to opening a website page from Self Service
  2. Open the website using the logged-in user’s default web browser
  3. Open the browser using the logged-in user’s privileges, even if the script itself is being run as root.

To accomplish this, I wrote a script which uses launchctl to open the browser using the logged-in user’s privileges, and uses the best launchctl method for the customer’s version of OS X or macOS. It also is designed to use Casper’s Parameter 4 ($4) value for the website address, which allows the script to be used by multiple policies to open the policy’s desired website.

The script is available below, and is also available from my GitHub repo:

From there, I uploaded the script to Casper:

Screen Shot 2016 11 10 at 9 34 41 AM

Screen Shot 2016 11 10 at 9 34 48 AM

As part of adding the script to Casper, I set the script’s parameter label for Parameter 4 to the following:

Website address

Screen Shot 2016 11 10 at 9 34 51 AM

 

Once the script has been added to Casper, you can set up a Self Service policy in Casper to use the script and provide the appropriate website address:

Screen Shot 2016 11 10 at 9 50 48 AM

Screen Shot 2016 11 10 at 9 36 28 AM

Screen Shot 2016 11 10 at 9 50 52 AM

Screen Shot 2016 11 10 at 9 50 55 AM

Once the policies are built, the policy should be available in Self Service for your customers to access.

Screen Shot 2016 11 10 at 9 51 36 AM

Screen Shot 2016 11 10 at 9 51 45 AM

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: