Skip to main content
Solved

CreateUserPkg to update passwords?

  • February 10, 2016
  • 6 replies
  • 15 views

rqomsiya
Forum|alt.badge.img+12

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

Best answer by mpermann

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

6 replies

bpavlov
Forum|alt.badge.img+18
  • Esteemed Contributor
  • February 10, 2016
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
Forum|alt.badge.img+22
  • Valued Contributor
  • Answer
  • February 10, 2016

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


Forum|alt.badge.img+7
  • Contributor
  • February 15, 2016

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).


Forum|alt.badge.img+5
  • Contributor
  • April 7, 2016

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
Forum|alt.badge.img+18
  • Valued Contributor
  • April 7, 2016

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


rqomsiya
Forum|alt.badge.img+12
  • Author
  • Honored Contributor
  • April 7, 2016

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