To generate a 32-chars random password with letters and digits:
openssl rand -base64 128 | tr -dc [:alnum:] | cut -c -32