4

Is there a way to enable the Guest user via the terminal in 10.14.x?

I have tried...

defaults write /Library/Preferences/com.apple.loginwindow.plist GuestEnabled -bool YES

On machines where the Guest account has been previously enabled and then disabled through the System Preferences -> Users & Groups GUI, this works.

However, on a machine where the Guest account has never been previously enabled, this does not seem to work. On the Users & Groups pane of System Preferences, the Guest account says "Logins Only" instead of enabled, and a Guest user is unable to login.

(I am managing a fleet of Macs without the use of a MDM, hence my desire to be able to do this without physically touching 100's of machines.)

2

The first time the Guest user is enabled, a new user is created with a process similar to that of any user creation.

The macOS procedure has been distilled into a script, essentially running dscl . -create /Users/Guest and other dscl configuration commands on the user.

The script is available at

and see the readme too for notes on Keychain. This has been tested to work in 10.14.2. Note that you will have to change or remove the OS version check if using on any OS above 10.8.

  • Script works great in 10.14.2. Note that you will have to change or remove the OS version check if using on any OS above 10.8 – Tim Dearborn Dec 19 '18 at 16:34
  • 1
    @Tim Great to know, I've added this to the answer. If you do fork the script for your uses, it'd be great to add a link to it :) – grg Dec 19 '18 at 16:36
  • Since I am not that great at regex, I just simply removed the version test from the script. Also, so far with some testing, there seems to be no ill effect with not running the Keychain LaunchAgent script. Am I missing anything in regards to this? – Tim Dearborn Dec 19 '18 at 17:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .