sp_help_revlogin from Microsoft. Search for it there for 2005. I think we might have the original version for 2000 here.
Yep, saved it: http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1711
The syntax changed slightly for 2005.
Use this on the first server to script out passwords, then run it on the new server to create logins. You still might need sp_change_userslogin to synch things.