View Install Rosetta 2.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View Privileges_DemoteOnLogin.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AssociatedBundleIdentifiers</key> | |
<array> | |
<string>corp.sap.privileges</string> | |
</array> | |
<key>Label</key> | |
<string>blog.mostlymac.demoteonlogin</string> |
View Enable TouchID for sudo.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View autopkg-update-smart-group.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################################################################### | |
# | |
# SCRIPT: autopkg-update-smart-group.sh | |
# AUTHOR: Sam Mills (@mostlymac; github.com/sgmills) | |
# DATE: 08 December 2022 | |
# REV: 1.0 | |
# | |
##################################################################################################### |
View Nudge Deferrals.zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View PatchSoftwareTitleID.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>PATCH_SOFTWARE_TITLE_ID</key> | |
<string>52</string> |
View LastRecipeRunResult.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dict> | |
<key>Processor</key> | |
<string>com.github.grahampugh.recipes.postprocessors/LastRecipeRunResult</string> | |
</dict> |
View Fetch Image from Jamf Server.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
fetch_from="$4" | |
save_to="$5" | |
# Check for the image and grab it if it does not exist | |
if [ ! -f "$save_to" ]; then | |
curl -o "$save_to" "$fetch_from" | |
fi |
View Re-enable Jamf Connect Login.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}' ) |
View Grant Current User Secure Token.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
NewerOlder