If you use the printable representation of the hash, the dictionary of characters that the hash uses is only digits 0-9 and a-f. While they likely still won't guess this, it's better to use 40 characters of the printable output of /dev/urandom directly, e.g.:
dd if=/dev/urandom bs=512 count=1 | strings -n1 | tr -d '\n'
Edit: the original question, before it was deleted, was whether using a hash of data from /dev/urandom would result in a good password.