Possible to restore password from backup file?

Hello. I've forgotten my root password, so I can't login via luci anymore. Is it possible to restore root password via backup file that I have?

If you have the backup of all config files, then you can remove the password from the backup config, reset the router to defaults, then apply the backup with your password removed.
Then you can login without password.


Thanks. But how to remove the password from the backup file? by deleting the '.\etc\passwd' file?

The password is in /etc/shadow. Find the line that starts with root and delete all chars between the first and the second : . The empty string there let you login as root with no password.

1 Like

You could also reset the root password in Failsafe Mode.

1 Like

It is not simple to restore password from backup. Password is saved via salted hash, so you should only brute-force it.