How are passwords generated that are used by Ubuntu 10.04? I know that they use SHA 512 as hashing algorithm, but I figure that there is some sort of salting done. I need to generate such a password myself. How can I do that? Is there a command line tool for that?
It should be trivial to hack up a quick python/perl/whatever script and call the crypt(3) function.
You can still use md5 passwords in the shadow file in systems that default to sha-512 or something else. The command like tool makepasswd can be used to generate a MD5 hash.
You can use the mkpasswd which strangely is part of the whois package on Debian/Ubuntu.
mkpasswd -m sha-512
. (Found here)