check this answer http://www.ifixit.com/Answers/View/47355... and see if it works for you.
Crankshaft position sensor is what is referred to as the engine speed sensor. Otherwise you may have a problem with the white/green wire that goes from the TCM to the ECM which sends the speed signal. The speed sensor is located on the transmission housing. Follow the cable that runs along the firewall to the transmission it will terminate into the speed sensor. Pull the clip at the end of the cable and the cable should release without trouble. Use a 10mm socket and an extension to unbolt it. After you remove that one bolt you can lift up on the speed sensor and remove it. There is also a good write up on here. since Altima's with different engine size also have different locations for that. Good Luck to you and let us know if it works.