Odd one today: what do you do when your account becomes disconnected from its password?
In this case, you utilize the single user mode, and do the exact opposite of the last blog entry. A client had set up a new machine with a freshly-restored Time Machine backup, and even though he had done everything right, somewhere down the line just lost the ability to log in. Even resetting the password from the install disc failed to do anything useful. As time was more crucial than getting granular with diagnostics, the simple and efficient fix was to blow out the account, then recreate it using the existing user folder.
As I think I've mentioned before, the dscl command is a wonderful thing; now that Netinfo is a rapidly receding memory, we can do a lot more with account creation and deletion than we could even a couple of years ago. Still, I digress. The first step was to use dscl to create a general purpose admin account to access the GUI, and from there it was fairly trivial to delete the old account, tweak the name of the user folder, then create a new account to match the tweaked name. Five minutes and one logout later, all was well.
I have to admit that in small but significant ways, living in the future is pretty cool. Doing this kind of tinkering back when OS X launched would have taken untold hours, and almost certainly resulted in the widespread destruction of data and livelihoods..
#
posted by Random Consulting @ 7:00 PM