Am looking to edit system preferences settings via the command line but cannot for the life of me find the correct names of variables.
In Login Options under Users & Groups, I would like to be able to change the Display login window from list of users to 'name and password'.
In Date & Time, I would like to know how I change the time to a server we use.
Enable fields in Sharing
Setup Energy Saver settings
It would be great if someone can help me out or point me in the right direction as I know you edit the preferences .plists but its knowing what to add or finding the preferred naming conventions.
Thanks.
Best Answer
First off, you can check out a website that lists a lot of these things: http://secrets.blacktree.com/
I, however, just took a brute-force solution:
Copy the Preferences folder
Launch System Preferences. Make a change via the GUI. Probably best to do one change at a time, e.g. I changed "Display Login Window as:" from "List of users" to "Name and password". Quit System Preferences.
Copy the Preferences folder again:
See which files changed:
Compare the two versions. Since they are binary files, you'll need to convert them to XML for comparison. I use an alias for this:
At this point we have located the setting. Confirm we have it with
defaults
:Launch System Preferences and confirm it changed.