Automate setup

I would like to configure the AR300M via CLI. I can run the initial ssh and script all the wifi and passwd setup. How do I set or trigger the initial setup via cli so it doesn’t ask for language and password setting? I would like to provision the device solely by script.

Why do you need that? Are you planing to use it for some business scenario?

You can set a password, and check the file /etc/config/glconfig, it has an option named password.

Yes it would be for a business scenario. We would like to automate a standard provision. How does the password hash string work. I have found that if I set a password on one device and add the string to another it doesn’t work. Is there a way to have this be a common config?

You can SSH into a “fresh” router without a password.

Be aware that musl only supports the basic form of salted passwords.

Flashing a precompiled ROM is often a better approach than run-time config. Use of /etc/uci-defaults/ is also a good approach for by-instance config.

You can use sha256 instead, such as ‘goodlife’, you can calculate the sha256 in https://passwordsgenerator.net/sha256-hash-generator/, it should be ‘0a12319020d4bd5f0ab23a49fa14f38886b90c261f6be0ba87878a2633f5d2ac’.

Thanks for the info. This was my problem, I was just copying the generated string after setting it in the webui vs generating it from sha256.

No, you should copy the generated string to /etc/config/glconfig, the string is different from the password be setting in the webUI.