We are given that \( N^2 \) is divisible by 24. Since:
\[ 24 = 2^3 \times 3 \]
This means that \( N^2 \) must be divisible by both 8 and 3. Therefore, \( N \) must have at least half the prime powers of 24 in its prime factorization.
For \( N^2 \) to be divisible by 24, \( N \) must be divisible by the square root of 24:
\[ \sqrt{24} = \sqrt{2^3 \times 3} = 2^{\frac{3}{2}} \times 3^{\frac{1}{2}} \]
The smallest integer satisfying this condition is:
\[ N = 2^2 \times 3 = 12 \]
Therefore, the greatest number by which \( N \) must be divisible is 12.