Category filter
Script to Customize Login Window on Mac
The login window has several settings, including selecting the user login and power options like shutdown, restart, and sleep. Organizations may need to hide the user list or disable the power options on the login page to ensure enterprises’ security. You can remotely execute custom scripts to customize the login window on macOS devices.
Scripting Language – Bash
File extension – .sh
Display the list of users in the login window
1 |
defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME false |
Display the username and password dialog box in the login window
1 |
defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME true |
Hide Shutdown icon from the login window
1 |
defaults write /Library/Preferences/com.apple.loginwindow ShutDownDisabled true |
Hide Restart icon from the login window
1 |
defaults write /Library/Preferences/com.apple.loginwindow RestartDisabled true |
Hide Sleep icon from the login window
1 |
defaults write /Library/Preferences/com.apple.loginwindow SleepDisabled true |
Replace ‘true
’ with ‘false
’ for enabling shutdown, restart and sleep icons in the login window.
Display a message in the login window
1 |
defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "text" |
Replace ‘text
’ with the required message to be displayed. If the script contains an exclamation mark, it will fail to execute.