Bypassing Mac Firmware Password

So I had a rather embarrassing situation today where I needed to boot my Macbook pro from a usb device but I had forgotten my password. After some background reading I found a very simple solution. From within OS X (I used snow leopard but the procedure should be the same for any Intel based mac) open terminal and run the following command:
sudo nvram -d security-mode
And the password is gone!
I believe it’s also trivial to decode your password from the output of nvram -p

Hiding Files in OS X

Just a quick post which might help anybody who wants to be able to hide files in Finder on their mac.
The chflags command lets you set a hidden flag that prevents a file from appearing in Finder (not the same as prepending the name with a . which is the typical way of hiding files in a unix based system)
This automator service creates a context menu in Finder to hide files easily. To show them again requires Terminal since you clearly can’t click a file you can’t see!
To show files the command is chflags nohidden [FILE]
(or add sudo if needed)
the code is as follows.
on run {input, parameters}
set myfilepath to (last item of input) as text
set command to "sudo chflags hidden \"" & POSIX path of myfilepath & "\""
do shell script command password "MY PASSWORD" with administrator privileges
end run

Code as above in Applescript action
If you don’t want your password saved in plain text in the automator file then simply remove the password “…” part and you will be prompted each time.

EDIT: It is also possible to manually add a Keychain item containing your password and have applescript use that instead. I don’t have the code to hand but if you’re interested then let me know.

Coming Soon…

So over the Easter break from uni I’ve been working on an exciting new project. After looking for a good system to allow a group of people to upload, tag and find photos I decided to write my own*.
So I’ve started work on “Media Asset Manager” which is PHP and MySQL based with a good spattering of jQuery!
There’s plenty of work left to do but for anybody who’s interested there’s some screen shots below.
Let me know if you might be interested in using it.
Screen shot 2011 04 18 at 23 19 50Screen shot 2011 04 18 at 23 20 56

*The closest thing I found was ResourceSpace, it’s really good but just seemed like a clunky workflow for what I wanted to do so I’m aiming for a more intuitive interface and process that allows the user to concentrate on the assets rather than the software