CreateUserPkg to update passwords?

rqomsiya
Contributor III

Hi all,

I'm successfully imaged a few machines with the and used createuserpkg to set the admin account/password.

Has anyone attempted to update the password (we need to do this quarterly) by creating another pkg and pushing it to the machine with the new updated password?

Thanks,
Ronnie

1 ACCEPTED SOLUTION

mpermann
Valued Contributor II

@rqomsiya I think you can do that right from a Casper policy. I've included a screen shot.

b5c555f268c0480890cee8a3241b73f3

View solution in original post

6 REPLIES 6

bpavlov
Honored Contributor
sysadminctl
    -deleteUser <user name> [-secure || -keepHome]
    -newPassword <new password> -oldPassword <old password> [-passwordHint <password hint>]
    -resetPasswordFor <local user name> -newPassword <new password> [-passwordHint <password hint>]
    -addUser <user name> [-fullName <full name>] [-UID <user ID>] [-password <user password>] [-hint <user hint>] [-home <full path to home>] [-admin] [-picture <full path to user image>]

Pass '-' instead of password in commands above to request prompt.

Doesn't answer your specific question, but might provide you with a different approach in your goal. Tool was introduced with OS X 10.10 I believe.

mpermann
Valued Contributor II

@rqomsiya I think you can do that right from a Casper policy. I've included a screen shot.

b5c555f268c0480890cee8a3241b73f3

benshawuk
New Contributor III

To answer the question directly, Yes: CreateUserPKG does update existing passwords, if the account already exists. (Make sure the UID doesn't change, otherwise permissions on the home folder will be incorrect).

Kyuubi
Contributor

Two questions from the posts above: 1) If you create a local user from the policy shown above is that hidden? Can you make it hidden if its not? 2) Does CreateUserPKG work with El Capitan?

Thx

davidacland
Honored Contributor II
Honored Contributor II

CreateUserPKG does work on 10.11. I'm not sure you can create a hidden account with the policy option, although sysadminctl can.

rqomsiya
Contributor III

Correct. It does work on 10.11.4 in my testing. I wouldn't set the UID to below 500, which would automatically create a hidden account.

I would set it to 501+ then use the sysadminctl command to set it as hidden. See this:
http://support.apple.com/kb/HT5017