There is no "nice" closed formula for what you are looking for. However, these numbers have been extensively studied, and are closely related to what is known as the Stirling numbers of the second kind (or the Stirling set numbers).
$S(n,r)$ denotes the number of ways of taking a set of $n$ distinct items and partitioning it into $r$ non-empty subsets. These subsets are not ordered, so for example if we were partitioning the set $\{1,2,3,4\}$, the partitions $\{ 1, 3 \} \cup \{2, 4\}$ and $\{2,4\} \cup \{1,3\}$ would be the same. However, if you are considering distributing items to $r$ (distinct) people, then you do want to have ordered sets. However, this can easily be achieved by ordering the $r$ subsets of any set partition, so you get a total of $r! S(n,r)$ ways of partitioning $n$ distinct items between $r$ people in such a way that everyone receives something.
Wikipedia has a reasonably extensive article on these numbers: https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind
We start with Stars and Bars
Ignoring the first condition, we get $\binom {N-1}2$
Now, we need to subtract off the cases in which two of the people got the same number of balls. If we specify the two people, that's $\big \lfloor \frac {N-1}2\big \rfloor$, since the third person has to get at least $1$. Of course, there are $3$ ways to specify two people.
Now, we see that we have subtracted off the case in which all three people get the same number of balls $3$ times and we only meant to subtract it once. Thus, in the case where $3\,|\,N$ we must add $2$.
Finally we see that the answer is $$
\begin{cases}
\binom {N-1}2-3\big \lfloor \frac {N-1}2\big \rfloor & \text{if $3\nmid N$} \\\\
\binom {N-1}2-3\big \lfloor \frac {N-1}2\big \rfloor +2& \text{if $3\,|\,N$}
\end{cases}$$
Sanity Check: If $N=9$ this gives $18$. Indeed, the possible triples are $(6,2,1)$, $(5,3,1)$, and $(4,3,2)$ plus their permutations.
Best Answer
It is correct. The way to distribute $m$ distinguishable objects in $n$ ordered boxes, regardless of the order of the objects within the boxes, is equal to $n^{m}$.