Hi
Let $\displaystyle m=2^ap_1^{a_1}...p_r^{a_r}$ a positive integer, $\displaystyle p_1,...,p_r$ distincts even primes. The group of units of the ring $\displaystyle (\mathbb{Z}_m,+,\times)$ is isomorphic to $\displaystyle (G\times\prod\limits_{i=1}^{r}\mathbb{Z}_{\phi(p_i ^{a_i})},+)$ where $\displaystyle \phi(p_i^{a_i})=p_i^{a_i-1}(p_i-1)$ and $\displaystyle G$ is:
$\displaystyle \{0\}$ if $\displaystyle a=0,1$
$\displaystyle \mathbb{Z}_2$ if $\displaystyle a=2$
$\displaystyle \mathbb{Z}_2\times\mathbb{Z}_{2^{a-2}}$ if $\displaystyle a\geq 3$
If I'm not wrong, that should be sufficient to prove that $\displaystyle m=2,3,4,6,8,12,24$ are the only solutions; but I let you show this, or disprove it