I saw this post here that mentions one method of generating cryptographically secure passwords. Recently, I was given a similar task and took a different approach.
One of the answers in that questions used the following
tr -dc '[:alnum:]' < /dev/urandom | head -c20
My method looked more like the following:
dd if=/dev/urandom bs="$password_length" count=1 | base64
I didn't have a requirement for it to be alphanumeric-only, and no requirement for it to contain symbols or anything like that. The only requirements were that it's 8 characters minimum (I went with 80 in practice because, if it only needs to be read/used by a machine, why not?), and hard to guess.
Is there any (cryptographically significant) difference between the two methods (aside from length)?