openssl rand -base64 24
That gives 32 characters of letters, digits, +, / and maybe a trailing =. For only letters and digits:
tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 32; echo
And if you want something you can actually read out loud over the phone, pwgen is a small package:
pwgen -s 20 1