I'm working on OS X Snow Leopard and need to programmatically generate an MD5crypt() password to match with passwords generated on Ubuntu 8.04 (crypt() on that platform uses MD5 if the salt starts with $1$ because it uses the crypt() found in glibc2 which has that functionality).
There is a md5crypt routine on OS X, but unfortunately, it's Tcl-only.
A painful option would be to pull apart the code for the openssl passwd command and write my own based on that.
I'm guessing that trying to compile glibc2 and link with that on OS X would likely be nearly impossible if not impossible.
Has anyone run across the problem and solved it? Or have suggestions? (I will be filing a bug with Apple asking for it to be added)