5

How to enable “Allow Guests to log in to this computer” option on Mac OS X 10.8 (Mountain Lion) via command line?

Hennes
  • 65,804
  • 7
  • 115
  • 169

1 Answers1

4

The option "Allow guests to log in to this computer" is stored as "GuestEnabled" key in /Library/Preferences/com.apple.loginwindow.plist

You can change it by using defaults command with root permission, tested on MountainLion 10.8.4

Read

sudo defaults read /Library/Preferences/com.apple.loginwindow GuestEnabled
#1 -> Enabled, 0 -> Disabled

Write

sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool YES|NO