macOS Lock Screen Customer Text

You can use an Automox Worklet to display a custom message on the macOS login window and lock screen. This is useful on Macs that are not enrolled in an MDM solution.

Evaluation Code

The evaluation code checks whether the message is already set. Keep the MESSAGE value identical in both scripts.

#!/bin/bash
# The message you want on the login window. Must match the Remediation Code.
MESSAGE="YOURTEXTHERE"

CURRENT=$(defaults read /Library/Preferences/com.apple.loginwindow LoginwindowText 2>/dev/null)

if [ "$CURRENT" = "$MESSAGE" ]; then
  exit 0
else
  exit 1
fi

Remediation Code

#!/bin/bash
MESSAGE="YOURTEXTHERE"

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "$MESSAGE"

Use double quotes around the message rather than single quotes so that text containing an apostrophe is handled correctly.

Verifying the message

Run the following on the device to read the current value:

defaults read /Library/Preferences/com.apple.loginwindow LoginwindowText

Removing the message

sudo defaults delete /Library/Preferences/com.apple.loginwindow LoginwindowText

What to expect

  • The message appears the next time the login window or lock screen is displayed. Users with an active session will not see it until they log out or lock the screen.
  • If a configuration profile from an MDM solution sets the login window text, the managed profile takes precedence and the value set by this Worklet will not be displayed. In that case, set the text in your MDM instead.
  • On Macs with FileVault enabled, the screen shown before macOS starts is not the macOS login window. Apple Silicon Macs start macOS and display the standard login window, so the message is shown. On older Intel Macs, FileVault uses a separate pre-boot screen where the message may not appear.
  • Worklet evaluation code runs on every device scan for any device assigned to the Worklet, whether or not the policy has a schedule. Using the evaluation code above rather than a hardcoded exit 1 keeps the Worklet from rewriting the value on every scan.

Common uses

  • Displaying ownership or asset-recovery contact information in case a device is lost
  • Showing acceptable-use or access notices before sign-in
  • Communicating general information to end users

Related articles

Was this article helpful?
0 out of 0 found this helpful