1. Setup ODBC on your Mac (including Apple Silicon)
Install brew
unixodbc package from brew works for Apple Silicon
| #!/bin/sh | |
| # Set the icons and branding | |
| selfServiceBrandIcon="/Users/$3/Library/Application Support/com.jamfsoftware.selfservice.mac/Documents/Images/brandingimage.png" | |
| fileVaultIcon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/FileVaultIcon.icns" | |
| if [[ -f $selfServiceBrandIcon ]]; then | |
| brandIcon="$selfServiceBrandIcon" | |
| else | |
| brandIcon="$fileVaultIcon" |
| #!/bin/sh | |
| # Location of macOS Build plist for comparison | |
| # Subsitute your org name for anyOrg, or place in another location | |
| buildPlist="/usr/local/anyOrg/macOSBuild.plist" | |
| # Get the local os build version | |
| # Using build version accounts for supplimental updates as well as dot updates and os upgrades | |
| localOS=$( /usr/bin/sw_vers | awk '/BuildVersion/{print $2}' ) |
| #!/bin/sh | |
| # Location of macOS Build plist for comparison | |
| # Subsitute your org name for anyOrg, or place in another location | |
| buildPlist="/usr/local/anyOrg/macOSBuild.plist" | |
| # Get the local os build version | |
| # Using build version accounts for supplimental updates as well as dot updates and os upgrades | |
| localOS=$( /usr/bin/sw_vers | awk '/BuildVersion/{print $2}' ) |
| #!/bin/sh | |
| # If cpu is Apple branded, use arch binary to check if x86_64 code can run | |
| if [[ "$(sysctl -n machdep.cpu.brand_string)" == *'Apple'* ]]; then | |
| if arch -x86_64 /usr/bin/true 2> /dev/null; then | |
| result="Installed" | |
| else | |
| result="Missing" | |
| fi | |
| else |
| #!/bin/sh | |
| # If cpu is Apple branded, install Rosetta 2 | |
| if [[ "$(sysctl -n machdep.cpu.brand_string)" == *'Apple'* ]]; then | |
| /usr/sbin/softwareupdate --install-rosetta --agree-to-license | |
| fi |
1. Setup ODBC on your Mac (including Apple Silicon)
Install brew
unixodbc package from brew works for Apple Silicon
| #!/bin/bash | |
| # Get the current user and their UID | |
| currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' ) | |
| currentUserID=$( id -u "$currentUser" ) | |
| # This is the line we need to add to enable TID | |
| enableTouchID="auth sufficient pam_tid.so" | |
| # Original sudo file location |
| #!/bin/bash | |
| # Check to see if TouchID is enabled and returns the number of enrolled fingerprints per user | |
| touchIDstatus=$( sudo bioutil -s -c | sed 's/Operation performed successfully.//g' ) | |
| if [ "$touchIDstatus" != "There are no fingerprints in the system." ]; then | |
| echo "<result>$touchIDstatus</result>" | |
| else | |
| echo "<result>Not configured</result>" | |
| fi |
| #!/bin/zsh | |
| # Get the currently logged in user | |
| currentUser="$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )" | |
| # Check for a logged in user and proceed with last user if needed | |
| if [[ $currentUser == "" ]]; then | |
| # Set currentUser variable to the last logged in user | |
| currentUser=$( defaults read /Library/Preferences/com.apple.loginwindow lastUserName ) | |
| fi |
| #!/bin/zsh | |
| :<<ABOUT_THIS_SCRIPT | |
| ------------------------------------------------------------------------------- | |
| Written by:William Smith | |
| Partner Program Manager | |
| Jamf | |
| [email protected] | |
| https://gist.github.com/6b78ba3fc4a6623dbc8225e2df38d570 |