I have several GL-MT300N-V2 routers I’m trying to configure in an automatic way. Connecting to their wifi and logging in via ssh is easy enough, but I’m unable to figure out how to set the admin password from the cli.
I’ve searched the configs for where the password is stored but didn’t find it, and tried to set it using the passwd command, which changed the ssh login password, but it the web interface password didn’t change with it. I’ve considered sending a POST request to http://192.168.8.1/cgi-bin/api/router/initpwd but I’d prefer to do everything over ssh if possible, at the moment this solution is my last resort.