X=$RANDOM
will invoke ksh's internal random number generator. If that is not good enough, you need to specify exactly what you are doing with the random number and how you are measuring randomness. See my password generator for a more robust random number generator written in ksh.
swordfish a password generator