How can I read Login options from terminal (Automatic login, Display login windows as, Network Account Server etc.)?

  • All in various plists in ~/Library/Preferences or readable via defaults. To get a better answer you need to be more explicit what exactly do you need and want to do – mmmmmm Mar 28 '13 at 13:29
  • In System Preferences->Users & Groups->Login Options are settings, that I need to extract and save. – tikend Mar 28 '13 at 14:00
  • 1
    As Mark already pointed out these settings are stored in various files. To make it easier to find a good answer, can you please amend the question to specifically list the options you are looking for? Adding an annotated screenshot of the Login Options screen might be useful as well. – nohillside Mar 28 '13 at 17:48

Most of these settings are stored in /Library/Preferences/com.apple.loginwindow.plist. The "Show fast user switching menu" setting is stored at ~/Library/Preferences/com.apple.systemuiserver.plist (for each user account on the system).

The Network Account Server settings are stored in your Directory Services database. You can utilize the dscl command to look at various settings dealing with your Network Account Server. I recommend using man dscl to look at the details of this function, but as an example I can use the following command to see the Active Directory domain I'm bound to at work:

dscl localhost -ls /Active\ Directory

For Open Directory you would use:

dscl localhost -ls /LDAPv3

Additional Note from OP: .plist files are coded in binary. To read them in Terminal you will want to make a copy of the file that you can tinker with, and convert that copy into XML format. Use the cp command to create your copy and plutil -convert xm11 examplefile.plist to convert to readable XML.

  • THX a lot, that's exactly what I was looking for. I just add, that plists are binary, to convert them to xml use plutil -convert xml1 some_file.plist. Before that, copy them elsewhere to don't mess up config. Add this to the answer if you can. – tikend Apr 2 '13 at 7:28
  • TIL, Cool, thanks – jalanb Jun 2 '20 at 7:32

You must log in to answer this question.

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