I use a shell script to streamline the initial setup for multiple routers, which invokes ‘curl’ to POST to the ‘initpwd’ webAPI.
Check my original post from last year.