Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
From the author of

Setting a Text-Only Login Banner from the Command Line for the FileVault 2 Pre-Boot Login Screen

FileVault 2 lets you set a text-only banner message that appears in the following locations:

  • FileVault 2 pre-boot login screen
  • OS login window
  • Screensaver lock window

Brevity is best, as staying within a maximum of three lines permits the banner text to be displayed consistently in all three locations. Exceeding the three-line limit may result in the text being cut off and not fully displayed.

You can set this banner text from the command line using the following defaults command, which should be run with root privileges (see Figure 26):

defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText “My Login Window Text Goes Here”
Figure 26

Figure 26 Using the defaults command to set the Mac's login banner.

However, if these functions were enabled from the command by using the defaults command, they may show up at the OS login window (see Figure 27) and the screensaver lock window, but not the FileVault 2 pre-boot login screen (see Figure 28).

Figure 27

Figure 27 Login banner appearing in the OS login window.

Figure 28

Figure 28 The login banner doesn't appear in the FileVault 2 pre-boot login screen.

The answer seems to be that, in addition to running the defaults commands, you need to update the /System/Library/PrivateFrameworks/EFILogin.framework manually, using the touch command. If you run the touch command on the right part of the EFILogin framework, the OS forces the system to update the FileVault 2 pre-boot login screen to use the banner text.

For example, running the following commands with root privileges updates the FileVault 2 pre-boot login screen with a login banner (see Figure 29):

defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText “My Login Window Text Goes Here”
touch /System/Library/PrivateFrameworks/EFILogin.framework/Resources/EFIResourceBuilder.bundle/Contents/Resources
Figure 29

Figure 29 Using the defaults and touch commands to set the Mac's login banner.

On restart, the FileVault 2 pre-boot login screen should look like Figure 30, with the banner text now showing.

Figure 30

Figure 30 Login banner appearing on the FileVault 2 pre-boot login screen.

To remove these banners, boot back into the OS and run the following command in the Terminal with root privileges (see Figure 31):

defaults delete /Library/Preferences/com.apple.loginwindow LoginwindowText
touch/System/Library/PrivateFrameworks/EFILogin.framework/Resources/EFIResourceBuilder.bundle/Contents/Resources
Figure 31

Figure 31 Using the defaults and touch commands to remove the Mac's login banner.

On restart, the text should no longer appear at the FileVault 2 pre-boot login screen, the OS login window, or the screensaver lock window.

  • + Share This
  • 🔖 Save To Your Account