Question

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.)

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top