Weekly News Summary for Admins — 2020-11-06

The news this week has certainly been… well… captivating on many levels.

Yesterday, Apple also dropped iOS 14.2 (and siblings) and a “macOS Catalina 10.15.7 Supplemental Update.” (I had hoped we were done with these.) Also, a “release candidate” for macOS Big Sur 11.0.1.

Next week, is the long anticipated third Apple Event this Fall, where everybody is expecting the first Apple Silicon Macs to be introduced and a macOS Big Sur release date to be announced. Whatever your process to prepare for a major macOS release is, I hope you are ready!

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same content, delivered to your Inbox once a week.)

Headlines

News and Opinion

macOS 11 Big Sur and Apple Silicon

macOS Catalina 10.15 and iOS 14 Updates

Coronavirus and Remote Work

MacAdmins on Twitter

  • Patrick Fergus: “Did you know (an Adobe Admin Console package of) Acrobat won’t install while Safari is running? Has anyone mentioned to the Acrobat team the reason blocking on Safari is because of the Acrobat NPAPI browser plugin Safari hasn’t loaded in a few years?”
  • Tim Perfitt: “I have been working with CryptoTokenKit’s persistent tokens on iOS 14.2 and something we have been hoping for for a long time on iOS. An app can vend a identity (private key + certificate) that can be consumed by other apps AND iOS itself.” (Thread)

Bugs and Security

Support and HowTos

Scripting and Automation

Apple Support

Updates and Releases

To Listen

Support

If you are enjoying what you are reading here, please spread the word and recommend it to another Mac Admin!

If you want to support me and this website even further, then consider buying one (or all) of my books. It’s like a subscription fee, but you also get a useful book or two extra!

Scripting OS X — Weekly News Summary for Admins — 2020-10-30

A strange thing happened last Friday: while I was putting together last week’s news summary, HP printer connections on Macs all over started showing strange error messages. First suspicions were on the Xprotect update published a day before, but then HP had to admit that they had ‘accidentally’ revoked a certificate that was still very much in active use. As usual, Howard Oakley and Mr Macintosh covered the issue in much detail.

macOS Big Sur is still in beta did a surprising step from “11.0 beta 10” to “11.0.1 beta 1.” This probably means that there will be new Mac hardware soon that ships with a version of 11.0, and immediately prompt for an update when they are run for the first time.

Even though the 2020 conference season is not over yet—you can register for Everyworld here—Jamf has gone ahead and announced that JNUC 2021 will also be virtual. This will planning uncertainty for the organizers, speakers, attendees. Virtual JNUC 2020 was already a great event, but there were many aspects that can be improved on and I am happy that Jamf is taking the time necessary to take that on.

On the topic of conferences, the MacAdmins Podcast had Patrik Jerneheim from the MacSysAdmins Conference talking about the experience of MacSysAdmin Online.

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same content, delivered to your Inbox once a week.)

News and Opinion

macOS 11 Big Sur and iOS 14

Coronavirus and Remote Work

MacAdmins on Twitter

  • Alexander Blach: “TIL: you can use a Lightning to USB3 Camera Adapter to migrate data to a new iPhone using a wired connection (no Wi-Fi) while also charging both iPhones from a single power adapter.”
  • Tim Perfitt: “Yes, this is probably from Xcode, but Xcode isn’t running nor is an iOS simulator. I have no idea what to answer here and I am an Apple developer since before Swift! How would I know if I should trust this? If I deny it, there could be issues with development” (Thread)
  • Mr. Macintosh: “As to why we are getting 11.0.1 This could mean that 11.0 is GM for Apple Silicon Macs currently in production. When they arrive in customers hands, 11.0.1 will show as an available update. Doing it this way hides the AS installer data so we can’t look at the new DeviceIDs.”
  • Erik Gomez: “I think it’s less to hide things and more that Big Sur just isn’t ready.”

Bugs and Security

HP Printer certificates

Support and HowTos

Scripting and Automation

Updates and Releases

To Listen

Support

If you are enjoying what you are reading here, please spread the word and recommend it to another Mac Admin!

If you want to support me and this website even further, then consider buying one (or all) of my books. It’s like a subscription fee, but you also get a useful book or two extra!

Weekly News Summary for Admins — 2020-10-23

Bit of a lull in the news between the previous iOS 14 and forthcoming macOS 11 releases. Apple is shipping the iPhone 12, iPhone 12 Pro, and iPad Air 4 this week and the devices look good in the reviews.

No reason to be bored, though. You probably haven’t caught up with the sessions from Virtual JNUC and MacSysAdmin Online, yet! (To be honest, there are some Campfire sessions I have not gotten around to watch yet.)

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same content, delivered to your Inbox once a week.)

News and Opinion

iOS 14 Updates

MacAdmins on Twitter

  • Patrick Wardle: “Previously, a comprehensive macOS firewall could be implemented via a Network Kernel Extension (kext) Apple deprecated kexts, giving us Network Extensions….but apparently (many of) their apps / daemons bypass this filtering mechanism. Are we ok with this!?” (Thread, Michael Tsai)
  • Joel Rennich: “Let’s talk attestation and boxes and what that means for generating keys on an iOS device. For a while folks, myself included, have been really interested in getting Apple to provide attestation statements about a key being in the Secure Enclave.” (Thread)

Bugs and Security

Support and HowTos

Scripting and Automation

Updates and Releases

To Listen

Support

If you are enjoying what you are reading here, please spread the word and recommend it to another Mac Admin!

If you want to support me and this website even further, then consider buying one (or all) of my books. It’s like a subscription fee, but you also get a useful book or two extra!

Dealing with xpath changes in Big Sur

In one of the recent betas for macOS 11.0 Big Sur, the xpath command line tool changed. Big Sur uses the 5.28 version of the tool, while Catalina defaults to the 5.18 version.

These aren’t version numbers for xpath but actually version numbers for perl. When you look at all the xpath executables you will see that they are actually perl scripts.

> head -n1 /usr/bin/xpath*
==> /usr/bin/xpath <==
#!/usr/bin/perl

==> /usr/bin/xpath5.18 <==
#!/usr/bin/perl5.18 -w

==> /usr/bin/xpath5.28 <==
#!/usr/bin/perl5.28

The perl environment will choose the xpath script ending in the version number matching the perl version automatically. The plain xpath script with no version number serves as fallback.

Either way, Catalina runs perl 5.18 and xpath5.18 and Big Sur runs perl 5.28 and the newer xpath5.28 script.

The problem here is that the newer xpath script has a different syntax:

[5.18] xpath [filename] query
[5.28] xpath [options] -e query [-e query...] [filename...]

Either version will use stdin when there is no file name, but the newer xpath requires the query string to be labeled with a -e argument.

So, your scripts that are using the xpath tool to parse XML data, will fail in Big Sur!

The easiest fix is to change the script to use the new syntax, i.e. insert the -e at the right place and if necessary re-arrange the arguments. But then the script will fail on older versions of macOS. Many of us will have to write our scripts to be able to support the latest and older versions of macOS for a transition time. For some MacAdmins the transition time can be several years.

Since Big Sur still includes xpath5.18, another solution is to just hardcode the version whenever you use xpath. But this will only defer the problem to a future version of macOS, when the 5.18 version of the script is removed.

A better solution is to check the version of macOS that is being used and to call xpath with the proper for each version:

    if [[ $(sw_vers -buildVersion) > "20A" ]]; then
        xpath -e "//query" "/path/to/file"
    else
        xpath "/path/to/file" "//query" 
    fi

This will call xpath with the new syntax on Big Sur (20A) and higher and use the older syntax otherwise. (Why I use the build version.)

If you are using xpath in multiple locations in a script, using this code everywhere will become tedious. In the Installomator script, we often use xpath to parse the download URL out of an XML file. As of now, there are nine occurences of xpath, but as more people contribute to Installomator, this is likely to go up.

There is a nice sleight-of-hand trick you can use to make the script resilient to change in Big Sur, without having to touch every use of xpath in the code.

At the beginning of the script (before the first use of xpath) insert this function:

xpath() {
    # the xpath tool changes in Big Sur 
    if [[ $(sw_vers -buildVersion) > "20A" ]]; then
        /usr/bin/xpath -e "$@"
    else
        /usr/bin/xpath "$@"
    fi
}

Since the shell interpreter (bash or zsh) will prefer a local function over an external executable, this function will now be used for all uses of xpath in the remaining code. We don’t need to touch them at all.

Within the function, we tell the interpreter to use the executable by using its full path.

In Installomator, we pipe data into xpath, so there are no files involved and the above works fine.

When you use xpath with files, it gets a bit more complicated, because the order of the arguments changed between the versions.

With the assumption that the current use is xpath [filename] query we can use the following:

xpath() { # [filename] query
    # xpath in Big Sur changes syntax
    if [[ -n $2 ]]; then
        local query=$2
        local filename=$1
    else 
        local query=$1
        local filename=""
    fi

    if [[ $(sw_vers -buildVersion) > "20A" ]]; then
        /usr/bin/xpath -e "$query" "$filename"
    else
        /usr/bin/xpath "$filename" "$query"
    fi
}

You will want to make a note for some point in the future, when you finally can drop Catalina support, to revisit these scripts and clean them up for the new syntax.

I have not yet encountered other command line tools that change in a similar way in Big Sur. If you do, you should be able to use a similar function to simplify the transtition.

When you do, let us know in the comments!

Installomator Updated: v0.4

I had been fairly busy with both the JNUC and MacSysAdmin presentations, but work on Installomator has continued.

I also did an overview of what Installomator does in my MacSysAdmin Online presentation: “Practical Scripting”.

Many of these new features have been provided from others, either through GitHub issues, pull requests, or through comments in the #installomator channel on MacAdmins Slack. Thanks to all who contributed.

What’s new in v0.4:

  • you can now set script variables as an argument in the form VARIABLE=value. More detail on this in the README file, ‘Configuration from Arguments.’
  • change downloadFromGit to match file types better
  • implemented a workaround for changed behavior of xpath in Big Sur
  • added an option prompt_user_the_kill to BLOCKING_PROCESS_ACTION which will kill the process after the third unsuccessful attempt to quit
  • added several new labels for total of 116

Get the script and find the instructions on the GitHub repo.

If you have any feedback or questions, please join us in the #installomatorchannel on MacAdmins Slack.

Thanks again to all those who contributed!

Weekly News Summary for Admins — 2020-10-16

We got the expected new iPhones 12 this week, all four models, and a new HomePod mini. I am actually looking forward to a smaller iPhone 12 mini to replace my iPhone X.

In other (some would say good) news, macOS 11 Big Sur was not released this week, but we got beta 10 instead. There is an expectation for another Apple event introducing the first Apple Silicon based Macs in the upcoming weeks and that would be an obvious time to release Big Sur to everyone.

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same content, delivered to your Inbox once a week.)

News and Opinion

macOS 11 Big Sur, Apple Silicon, and iOS 14

MacAdmins on Twitter

  • Taha Karim: “MacOS Ransomware in one tweet” (Thread, via Mat X)
  • William Smith: “Tomorrow (October 13, 2020): Support for Microsoft Office 2016 for Mac — any version 16.16.x and lower— ends. No more software updates to fix: • Bugs • Compatibility problems • Security vulnerabilities – No macOS Big Sur support”

Bugs and Security

Support and HowTos

Scripting and Automation

Updates and Releases

To Watch

To Listen

Support

If you are enjoying what you are reading here, please spread the word and recommend it to another Mac Admin!

If you want to support me and this website even further, then consider buying one (or all) of my books. It’s like a subscription fee, but you also get a useful book or two extra!

Weekly News Summary for Admins — 2020-10-09

For now this has been a quiet week. Since Apple announced another event next week, possibly a calm before the storm. After Apple announced iOS 14 with 24 hours notice, MacAdmins are understandably a bit nervous. Also, no new betas this week (so far).

On the other hand, after JNUC last week, we had MacSysAdmin this week. I have not been able to watch all presentations yet, but those that I have seen have been worth it and I am looking forward to the rest.

In other news, this newsletter just passed the 1000 email subscribers number! Thank you all for reading, and on to the next thousand!

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same content, delivered to your Inbox once a week.)

News and Opinion

macOS 11 Big Sur and iOS 14

MacAdmins on Twitter

  • Eliz: “Please don’t say just “Hello” in a chat #NoHello” (Read thread and links for background. I find myself doing that a lot, too, and have resvoled to do better.)

Bugs and Security

Support and HowTos

Scripting and Automation

Updates and Releases

To Watch

To Listen

Support

If you are enjoying what you are reading here, please spread the word and recommend it to another Mac Admin!

If you want to support me and this website even further, then consider buying one (or all) of my books. It’s like a subscription fee, but you also get a useful book or two extra!

Weekly News Summary for Admins — 2020-10-02

Another very busy week. (But aren’t they all?)

The Mojave Supplemental Update was pulled and re-released, Jamf continues buying interesting people and technology, and we got macOS Big Sur beta 9 with a feature/fix that MacAdmins have been clamoring for.

Virtual JNUC 2020 was on and had some great sessions. If you have registered you can (re-)view the sessions in the portal for three more weeks and then they will be moved to the Jamf YouTube channel. Thanks to everyone who presented a session, I have not been to watch the all (not even close) but will try to over the next few weeks. Thanks also, to everyone who watched my session live and for all the kind feedback I have already gotten. You can find the slides, notes and links for my session here.

Don’t fall into the post-conference slump just yet, because MacSysAdmin Online will be next week!. Participation is free, but you can still support the team by buying the MacSysAdmin Online T-Shirt, which will also enroll you in an exclusive giveaway raffle.

If you would rather get the weekly newsletter by email, you can subscribe to the Scripting OS X Weekly Newsletter here!! (Same content, delivered to your Inbox once a week.)

News and Opinion

macOS 11 Big Sur and iOS 14

macOS Catalina 10.15 and iOS 13 Updates

MacAdmins on Twitter

  • Steve Hayman: “Your grep one-liner du jour. Count how many words of each length appear in the /usr/share/dict/words dictionary. for n in $(jot 25); do printf "%2d letter words: " $n; grep -E "^.{$n}\$" /usr/share/dict/words | wc -l; done” (Thread)

Bugs and Security

Support and HowTos

Scripting and Automation

Apple Support

Updates and Releases

To Watch

To Listen

Just for Fun

Support

If you are enjoying what you are reading here, please spread the word and recommend it to another Mac Admin!

If you want to support me and this website even further, then consider buying one (or all) of my books. It’s like a subscription fee, but you also get a useful book or two extra!

Virtual JNUC 2020 Session: Scripting Jamf Pro – Best Practices

You can find my notes to my Virtual JNUC 2020 session here.

The session should be available “on demand” in the JNUC2020 portal within an hour or so. I believe all sessions will be available on YouTube eventually and will update the links then!

I hope you enjoyed the session, and if you have any more questions or comments, then I am @scriptingosx on the MacAdmins Slack and Twitter.