Bash - Random Password Changer

Here’s a script that will change a user’s password at random internals with a randomly generated 30 character password. :)

#!/bin/sh
while true;
do
    for i in `< /dev/urandom tr -dc A-Za-z0-9_ | head -c30`;
    do
        echo 'someuser:$i' | sudo chpasswd;
        time=`< /dev/urandom tr -dc 0-9 | head -c5`;   
        sleep $time;
    done
done