Speed Dating for Mac Admins
Terminal Login Banner
Last login: Wed Jun 1 23:03:39 on ttys000
'c. Logged in as: bill.smith
,xNMM. ---------------------------------
#!/bin/zsh | |
# server connection information | |
URL="https://jss.talkingmoose.net:8443" | |
userName="JSSAPI-Editor" | |
password="password" | |
# use base64 to encode credentials | |
encodedCredentials=$( printf "$userName:$password" | iconv -t ISO-8859-1 | base64 -i - ) |
Last login: Wed Jun 1 23:03:39 on ttys000
'c. Logged in as: bill.smith
,xNMM. ---------------------------------
#!/bin/zsh | |
<<ABOUT_THIS_SCRIPT | |
----------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/bd4abab222685c4e3781967a4d0491f6 |
#!/bin/zsh | |
# these local accounts will not be removed from admins | |
# one account name per line; keep the beginning and closing quotes | |
exceptionsList="talkingmoose | |
bill.smith | |
oszein | |
jamfadmin" |
#!/bin/zsh | |
:<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Alert! This script will only work with Intel Macs. There is no secure automated | |
locally-initiated way to trigger an update or upgrade for Apple Silicon Macs. | |
Those require an MDM command be sent from their Mobile Device Management (MDM) | |
server. | |
#!/bin/zsh | |
:<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Written by:William Smith | |
Partner Program Manager | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/6b78ba3fc4a6623dbc8225e2df38d570 |
#!/bin/zsh | |
# Try to read the com.jamf.connect.login.plist file for license information | |
licenseInfo=$( /usr/bin/defaults read /Library/Managed\ Preferences/com.jamf.connect.login LicenseFile 2> /dev/null | /usr/bin/base64 --decode ) | |
# If the file doesn't exist, try to read the com.jamf.connect.plist file for license information | |
if [ "$licenseInfo" = "" ]; then | |
licenseInfo=$( /usr/bin/defaults read /Library/Managed\ Preferences/com.jamf.connect LicenseFile 2> /dev/null | /usr/bin/base64 --decode ) |
Model information: https://support.apple.com/en-us/HT212551 | |
Published Date: March 18, 2022 | |
Verification: https://regex101.com/r/OozSRv/6 | |
1) Regex matches major identifier — Matches major model identifier numbers based on Apple's knowledge base article (more accurate): | |
(^Mac13|MacBook(10|9)|MacBookAir(10|[7-9])|Macmini[7-9]|MacPro[6-7]|iMacPro1|iMac(1[6-9]|2[0-2])),\d|MacBookPro1(1,[45]|[2-8],\d) | |
2) Regex matches current or higher — Matches model identifiers based on Apple's knowledge base article and may match higher versions before this regex is updated (more future-proof). |
#!/bin/bash | |
# server connection information | |
URL="https://talkingmoose.jamfcloud.com" | |
username="api-editor" | |
password="P@55w0rd" | |
# provide the Jamf Pro ID of the PreStage Enrollment; look in the URL when viewing the PreStage Enrollment | |
mobileDeviceID="15" |