[doublepost=1460015390][/doublepost]Ideally something I can apply via some form of a script through deploy studio i.e.Just to clarify, you specifically want to use Terminal instead of system prefs?
This can be managed with a configuration profile. That's probably the easiest way to handle it. The easiest way to do that is to get a copy of OS X Server and set up the profile manager. It's not necessary to use profile manager to enroll your computers, but you can. Some people would say that Profile Manager isn't a reliable way to manage systems. If you opt not to enroll computers, you can just download the profile then install that profile into your client computers.[doublepost=1460015390][/doublepost]Ideally something I can apply via some form of a script through deploy studio i.e.
Deploying a new image to 100 macs, 50 of them want the "Name and password" at login and 50 want "List users" so instead of holding two different image builds was wondering if these setting could be changed via a script / terminal that I could place in a deploy studio workflow to automate the changes.
dscl doesn't handle loginwindow preferences.Take a look at the dscl command here. It can do some manipulation of user accounts and might be able to do what you want.
Deploystudio is a boot environment that's used to image a Mac. It has the capability to run scripts post-imaging in the DeployStudio boot environment. Permissions won't be a factor as DeployStudio is specifically designed to do this sort of thing. You write a script, save it as a file, then add a deployment step that runs that script. It'd even be possible to actually deploy a plist directly after imaging but before booting the client OS.A scripted change will need to run as root. Do scripts in Deploy Studio always run as root?
Then that might be another option.... It'd even be possible to actually deploy a plist directly after imaging but before booting the client OS.
/usr/libexec/PlistBuddy -c print /Library/Preferences/com.apple.loginwindow.plist
Dict {
RetriesUntilHint = 3
autoLoginUser = mr.cipher
OptimizerLastRunForSystem = SOME_NUMBER
lastUserName = mr.cipher
autoLoginUserUID = 666
SecureEraseOption = 0
MasterPasswordHint = sympathy
lastUser = loggedIn
OptimizerLastRunForBuild = SOME_NUMBER
MCXLaunchOnLogout = true
}
/usr/libexec/PlistBuddy -c print /Library/Preferences/com.apple.loginwindow.plist
Dict {
RetriesUntilHint = 3
autoLoginUser = mr.cipher
OptimizerLastRunForSystem = SOME_NUMBER
lastUserName = mr.cipher
autoLoginUserUID = 666
SecureEraseOption = 0
MasterPasswordHint = sympathy
lastUser = loggedIn
OptimizerLastRunForBuild = SOME_NUMBER
SHOWFULLNAME = true
MCXLaunchOnLogout = true
}