The iPhone Dev team released the PwnageTool 3.1.4 a couple of days ago which allows users on a Mac to Jailbreak and Unlock the iPhone 2G, 3G and the iPhone 3G[S] on Firmware 3.1.2. I haven't been able to post the tutorial due to a busy routine so I am providing the hacktivated firmware for iPhone OS 3.1.2 which will allow any Mac or Windows user to Jailbreak and Unlock their iPhone.
The process will work only on those iPhones which have been Jailbroken at least once on a previous firmware. So if you bought a new iPhone and plan to follow through the guide, there is a good chance that your time will go in vain.
For the iPhone 2G
http://bit.ly/iphone2g-custom312-sizlopedia
http://bit.ly/iphone2g-custom312-sizlopedia-p2
http://bit.ly/iphone2g-custom312-sizlopedia-p3
For the iPhone 3G
http://bit.ly/iphone3g-custom312-sizlopedia
http://bit.ly/iphone3g-custom312-sizlopedia-p2
http://bit.ly/iphone3g-custom312-sizlopedia-p3
For the iPhone 3G[S]
http://bit.ly/iphone3gs-custom312-sizlopedia
http://bit.ly/iphone3gs-custom312-sizlopedia-p2
http://bit.ly/iphone3gs-custom312-sizlopedia-p3
http://bit.ly/iphone3gs-custom312-sizlopedia-p4
First download all the files that go with your iPhone model and then join them together using HJSplit (for Windows) and Split & Concat (for Mac). Once all the files have been joined together into a single ZIP file, extract the archive to get the custom IPSW.
Now connect the iPhone to the computer, open iTunes 9 and click 'Restore' while holding SHIFT key (on Windows) and OPTION key (on Mac) and select the Custom IPSW. That's it. To Unlock, just use Ultrasnow (Instructions available here, starting from Step-3).
This tutorial would work for any user on a Mac or Windows.