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 the enterprises’ security. You can remotely execute custom scripts to customize the login window on macOS devices.

Scripting language – Bash

File extension – .sh

Disclaimer:


The sample scripts provided below are adapted from third-party open-source sites.

Display the list of users in the Login window

The command will display all the user accounts available on the device except the hidden ones on the login window.

All the user accounts are listed on the login window

Display the username and password dialog box on the Login window

The command will display the username and password dialog box prompting the user to enter the credentials of the user account they want to log in to.

User is prompted to enter credentials to login

Hide Shut Down icon from the Login window

The command will hide the Shut Down option from the login window barring any user from shutting down the device from the login window.

Hide Restart icon from the Login window

The command will hide the Restart option from the login window barring any user from restarting the device from the login window.

Hide Sleep icon from the Login window

The command will hide the Sleep option from the login window barring any user from putting the device on sleep mode from the login window.

Replace ‘true’ with ‘false’ for enabling shutdown, restart and sleep icons in the login window.

Display a message on the Login window

Replace ‘text’ with the required message to be displayed. If the script contains an exclamation mark, it will fail to execute. For instance, if you replace text with ‘Your device is visible to the administrator’:

Message is displayed on the login window
Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository