[OpenWRT] How to preset root password when compile OpenWRT

By default, after compiling the OpenWRT, the root password is empty, you can setup it using the web interface. Alternatively, if you didn’t include LuCI when compiling, you can telnet into your router to set it up before be able to connect via ssh.

It’s easy to setup one up when you compile the openwrt build before you write the firmware in. Simply change /package/base-files/files/etc/shadow 
replacing the 1st line with:

root:$1$ca4dNwCu$40baZW.ZsS0v.QDnZ5HyE/:15225:0:99999:7:::

Compile as usual. Your default root password will be “123”.

« »

Leave a Reply

Your email address will not be published. Required fields are marked *