Is there a way to solve the equation $m(m-1) \equiv 0 \pmod n$ for $1 < m < n$? In this case, $n$ is known and I am solving for $m$. I am especially interested in either the highest or lowest value of $m$ given the listed bound, though finding any value works as well.
Edit: $n$ is not prime, nor is it a prime power ($p^n$ for prime $p$ and natural number $n$). I am also not interested in the trivial solutions ($m = 0$ and $m = 1$).