Password Reset

A little bit ago, I was confronted with a problem whose solution I think is worth sharing. My mother-in-law forgot what password she had put on her new (used) MacBook. Normally this isn’t an issue because you can always pop-in the installer disc and reset the password. Unfortunately, there was nary an installer disc to be found.

Fortunately, there is a trick for just such an occasion.

First of all, make sure you know your short username. This is the name you see on your home folder in the finder.

Once that is retrieved, boot into single user mode. This is accomplished by holding the command key and “s” while booting. Single user mode puts the computer into a command line interface as the “root” user, or administrator that can make any changes – no questions asked.

But first, we have to make the filesystem writeable, since it is mounted in a read-only state initially. use the following command:

mount -uw /
Now that the filesystem is writeable, meaning that you can make changes to it, it is time to reset the password. Password retrieval is not feasible as it is encrypted, but you can overwrite it using a built in utility called passwdpasswd will create the new password and store it in the correct place with the proper encryption. To use it, simply type in the command followed by the short user name mentioned earlier.

passwd username
This will prompt you for a password which you will then need to type in twice for verification. Once you have done that, you can safely restart and use your new password! To restart, type the command:

shutdown -r now
Well, I hope this helps someone else out (and that it is only used for good purposes!).

Never Type This As Root

I was working on a shell script this morning to make my life easier on some trivial task. The last few lines looked a little like this.

somedir=/mnt/tmp
mv $somedir/*.txt ~
rm -rf $somdir/*

Obviously I meant to remove all the files in the directory, however a typo in the variable name led to the deletion of /. I caught it before it got to the home folder, but bin and dev were gone resulting in a broken system that needed to be reinstalled.

Never delete * as root unless you are sure you know what you are doing….

Old Hardware

I like to replicate objects in vector form, particularly shiny new tech toys. But one thing I have never really tried to do is replicate old 80’s tech. Old-school beige technology is different from modern industrial design, and it seemed like it might be a fun little challenge. I decided to whip out the Apple ][ screen in vector form for fun. Below is the result.

Although it has clean lines, all the lines are all soft and beveled, in contrast to today’s predominant style of hard edges. It’s funny to see the beige and brown duotone housing as it is something that would never be produced today, however it is distinctly an Apple design as is evidenced by it’s minimal markings and functional design.

© 2007-2015 Michael Caldwell