Mathematica.app is now Wolfram.app

With version 14.1 of the desktop app, Mathematica.app is now Wolfram.app. In addition to a new path and a new bundle identifier for the application, there is also a new path if you deploy a mathpass file as we do in our organization.

/Library/Mathematica/Licensing/mathpass as of version 14.1 becomes /Library/Wolfram/Licensing/mathpass

Deploying SPSS 27

Good news! As of SPSS 27 IBM is finally shipping an Apple installer package for macOS instead of their Java based silent installer. Looking at the installer, it has a few minor issues but is for the most part sane. The package can be imported into Munki without much fuss.

As in the past, activation will need to be scripted post install to license SPSS. The format of the path to the application has changed a bit, my postinstall script now looks like :

#!/bin/sh

SERVERPATH="server.myorg.org"
ACTIVATIONPATH="/Applications/IBM SPSS Statistics 27/Resources/Activation"

cd "$ACTIVATIONPATH"
./licenseactivator LSHOST=$SERVERPATH COMMUTE_MAX_LIFE=7

Enabling and Disabling SSH using Munki

I recently needed to be able to test connectivity from client systems in a number of locations to some new infrastructure. Obviously being able to remotely login to these systems is a lot more efficient than traveling around to all the locations. We do not have SSH enabled by default on our managed macOS clients.

I wanted to use Munki to enable SSH on select systems for testing, and then be able to disable it after testing was completed. I chose to do a nopkg installer to do this.

First up, the installcheck_script to check if SSH is enabled :

#!/bin/bash

#check to see if ssh is off
if [[ $(/usr/sbin/systemsetup -getremotelogin) = 'Remote Login: Off' ]] 
then
	# exit 0 to tell Munki an install is needed
	exit 0
fi
# if not needed, exit 1
exit 1

Next, the postinstall_script to enable SSH :

#!/bin/bash

/usr/sbin/systemsetup -setremotelogin On

if [[ $(/usr/sbin/systemsetup -getremotelogin) = 'Remote Login: On' ]] 
then
	exit 0
fi

exit 1

Finally, the uninstall_script to disable SSH:

#!/bin/bash

/usr/sbin/systemsetup -f -setremotelogin Off

To build these into a suitable munki pkgsinfo :

makepkginfo --nopkg \
 --installcheck_script installcheck_script.sh \
 --postinstall_script postinstall_script.sh \
 --uninstall_script uninstall_script.sh \
 --unattended_install \
 --unattended_uninstall \
 --uninstall_method uninstall_script \
 --name Enable_SSH \
 --pkgvers 1.0 > Enable_SSH-1.0.plist

I then had to edit Enable_SSH-1.0.plist to add an uninstallable key with a value of True. The plist was copied into our munki repo and makecatalogs was run. I now have an item that when added to managed_installs will enable SSH on the next munki run. Conversely I can add it to managed_uninstalls to disable remote login.

Source files can be found in this GitHub repo

Renewing SPSS for Mac License Silently – Update

I previously wrote about a script to license SPSS for Mac silently. In version 25 of SPSS Statistics, the path to the bundled Java has changed. It now no longer has the version of the JRE in the path. As a result the script now looks like this :

#!/bin/bash -x

VERSION=25
AUTHCODE=<redacted>

APPPATH="/Applications/IBM/SPSS/Statistics/$VERSION/SPSSStatistics.app/"
cd "$APPPATH/Contents/bin"

"$APPPATH/Contents/JRE/bin/java" -jar "$APPPATH/Contents/bin/licenseactivator.jar" SILENTMODE CODES=$AUTHCODE

If SPSS keeps a consistent path to the bundled Java, it will make it a little bit easier to update the script for each new version of SPSS Statistics.

Sharing What We’ve Learned

This post is a companion to a workshop delivered with Anthony Reimer. Included is a list of links to additional resources.

Slack signup:
http://macadmins.org

Jamf Nation :
https://www.jamf.com/jamf-nation/

Email Lists :
http://lists.psu.edu/archives/macenterprise.html
https://groups.google.com/forum/#!forum/munki-dev
https://groups.google.com/forum/#!forum/munki-discuss
https://groups.google.com/forum/#!forum/autopkg-discuss

GitHub :
https://github.com

Presenting :
https://hynek.me/articles/speaking/
https://www.radiotope.com/blog/?p=posts/2017/02/09/Speaking_Professionally.md
https://www.inc.com/carmine-gallo/how-googles-ceo-creates-brain-friendly-presentations.html
http://speaking.io/

Blogging :
https://www.youtube.com/watch?v=i0BKZi966kQ
https://learn.wordpress.com/get-started/
https://pages.github.com/

Vaughn’s web site : http://www.vaughnemiller.com
Anthony’s web site : https://jazzace.github.io

Git and Text Editor Notes for Windows 10

This post is just some notes to remind me how I like to setup a Windows 10 machine for editing scripts.

 

Install and configure Git
First step, install Git. Download the git installer. After downloading, run the installer and accept the default settings.

Then add posh-git for Powershell :
Open a Powershell window “as Administrator” and execute the following :

set-ExecutionPolicy bypass
git clone git://github.com/dahlbyk/posh-git.git
cd posh-git
./install.ps1
. $PROFILE

 

Install and configure Sublime Text
Start by downloading and installing Sublime Text. Accept the default settings during installation.

Next, we want to be able to launch Sublime Text from the command line. To do this we need to make some changes to our environment variables.

First create a new system variable with a name of SUBLIME and a value of C:\Program Files\Sublime Text 3

Add a system variable named SUBLIME and set the value to the path to Sublime Text

Next, Edit the user variable Path and append ;%SUBLIME% to the end.

Now we can simply use subl.exe to launch the editor from a command line.

I like to add some packages to Sublime Text to make it more useful. To do this, first install Package Control. To do this, visit the Package Control site and follow the instructions.

After installing package control, we can install some packages. Open Sublime Text and press Ctrl-Shift-P. Start typing install into the search box and choose Package Control: Install Package You can now search for useful packages. I like to install support for Powershell and VBScript.

 

Reference Links
http://learnaholic.me/2012/10/12/make-powershell-and-git-suck-less-on-windows/
https://scotch.io/tutorials/open-sublime-text-from-the-command-line-using-subl-exe-windows

Building a Signed Package with The Luggage

Recently I wanted to be able to sign a package that I was building with The Luggage.

Since The Luggage is calling pkgbuild to build the package, I took a look at the pkgbuild documentation and determined that the following argument was needed :
--sign "Common name of signing cert"

The question then became : how to add this to my Makefile? Taking a look at luggage.make I saw that PB_EXTRA_ARGS is the variable used to contain the arguments for the pkgbuild command.

To add my signing argument, I simply added this line :
PB_EXTRA_ARGS+= --sign "Developer ID Installer: John Doe (ID12345678)"
This appends my –sign argument to the list of pkgbuild arguments and can be placed anywhere after the statement that includes luggage.make.