How to preset root password when compile OpenWRT

[Network] 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 Comment

This post is created on October 12, 2014 and last updated on January 22, 2024