Posted on 05-13-2016 03:54 PM
Hi All,
Anyone know how to change a data key in a plist file? I am trying to change the ShadowHashData key in the user's plist file in terminal. So for example:
ShadowHashData = (
<1111 11111 1111>
)
and I want to change it to
ShadowHastHdata = (
<22222 22222 2222 2222>
).
Anyone know the syntax on performing this task?
Posted on 05-14-2016 04:54 AM
You can change data using the defaults command.
defaults write File.PLIST key value
If adding a new key, you must specify the type.
or you can use plistbuddy command line. An other alternative is to use xcode.
I'm a bit concerned about what you are trying to accomplish and if that's something you should be changing, but I'll trust you know what you are doing.
Posted on 05-17-2016 11:56 AM
I tried that and also tried the "dscl . -change" but it is not working. I'm trying to write a shell script that I can push out to change all the admin password. Instead of putting the password in the shell script as plain text I want to use the Hash password.
Posted on 05-17-2016 12:00 PM
Oh! yeah, you don't want to do that via dscl or defaults. Your JSS can do that under Policies, create an account, or change password. Another option is to use the CreateUserPKG which builds a pkg (installer) that creates a user. You can distribute that via a policy. https://github.com/MagerValp/CreateUserPkg