From Number Theory we have the theorem that:
There are primitive roots mod $n$ if and only if $n = 1,2,4,p^k, 2p^k$, where $p$ is an odd prime.
The question is, for such general $n$ given as above (with $n \neq p$), how does one find primitive roots without having to brute-force? Perhaps the Chinese Remainder Theorem is relevant? I'm excluding the case $n=p$ because it already has a well-written answer Finding a primitive root of a prime number .