- This topic has 4 replies, 3 voices, and was last updated 17 years, 8 months ago by
dead2sin.
-
AuthorPosts
-
February 18, 2009 at 5:51 pm #375458
dead2sin
ParticipantOk, 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
February 18, 2009 at 7:44 pm #375461Anthony Reimer
ParticipantIs 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.
February 18, 2009 at 7:51 pm #375462dead2sin
ParticipantHrmm, 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
February 18, 2009 at 8:43 pm #375464larkost
ParticipantIf 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.
February 18, 2009 at 8:48 pm #375465dead2sin
Participantlarkost wrote:
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.
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
-
AuthorPosts
- You must be logged in to reply to this topic.