Can one compute $(p-1)!$ modulo $p^2$ in time polynomial in $\log p$? I can do it modulo $p$! (The last one is an exclamation point, not a factorial.)

More generally, I would like to be able to compute $d!$ modulo $p^N$ in time polynomial in $N \log p$.