Home Forums Software InstaDMG Changing Admin Password without booting image

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #375458
    dead2sin
    Participant

    Ok, here is my dilemma.

    I have a bunch of images that are read only image .dmgs, but I need to change the local admin password on them.

    I know how to mount the files as read-write using hdiutil and the -shadow command, so the question is this:

    Is it feasible to change the password on the volume via a package (similar to what createUser does)?

    I’m trying to change the password without having boot into each one, change it, then clean it up and use disk utlity to make and image/scan for ASR.

    Any suggestions?

    Nate

    #375461
    Anthony Reimer
    Participant

    Is there any reason that the password needs to be changed on the image rather than after deployment? Thanks to the help of the people who frequent this board, I learned that a single UNIX command, optionally pushed out via ARD, changes the password instantly:

    dscl . -passwd /Users/username newpassword

    I changed the local admin password for an entire lab in a few seconds.

    #375462
    dead2sin
    Participant

    Hrmm, yea. I have that command and I’ve used it to change all the computers that currently are deployed. The reason I want to change it on the image is because we have a computer lab that images their machines themselves, so it is hard for me to keep on top of changing the admin password.

    Perhaps I’ll just change their image the hard way and then our main image I can just change it after imaging it (I’m the only one that uses the regular image).

    Thanks for the idea =)

    Nate

    #375464
    larkost
    Participant

    If you take apart the createUser package you will find that it installs the password as a file into /private/var/db/shadow/hash/. The file name needs to be the GeneratedUID from above.

    #375465
    dead2sin
    Participant

    [QUOTE][u]Quote by: larkost[/u][p]If you take apart the createUser package you will find that it installs the password as a file into /private/var/db/shadow/hash/. The file name needs to be the GeneratedUID from above.[/p][/QUOTE]

    Ah, that makes sense. So if I just put the password into a hash and replace the one that is currently there, it should do the trick. I’ll fiddle with this for a little while.

    thanks again,

    Nate

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed