I'm trying to disable Guest Account from terminal.
I need the same effect like disabling System Preferences → Accounts → Guest Account → Allow guests to connect to shared folders.
I think Guest Access is disabled by default on Lion, So I need it for 10.5, and 10.6.
Best Answer
On OS X Lion, the preference is internally realized as two separate options:
In
/Library/Preferences/com.apple.AppleFileServer
, it's theguestAccess
flag, and in/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist
, it's theAllowGuestAccess
flag.To change these, execute the following with
root
permissions:Not sure if these are the same in previous versions of OS X. Use
defaults read <path>
to find out if these options exist on your system.You might need to relaunch the sharing service for the changes to take effect.