Password change over ssh

Hello,

I’m trying to create a script to automatically configure the RUT200 router via SSH, setting it up from its factory settings to be ready for field installation. I’ve managed to handle most of my requirements, but I’m struggling with the password change.

When I use the command:

passwd admin

The password is successfully changed for both the admin and root accounts. However, when I access the web GUI, the “Change Password Wizard” still pops up, and I’m unable to proceed with the interface.

Is there a way to inform the system that the password has already been changed, so the wizard doesn’t appear?

Thanks in advance for your help!

Hi…

I am not a UCI expert…

Did you try, after changing the password… do a uci commit at cli, using your script?

OR

changing the password, using uci command?
typing uci show /etc/config/rpcd, I can see lines about root and admin password… But can changed using uci command? I am sorry… I don’t know… I am looking about. No promisses.

Hello,

Could you try using the following commands after changing the password?

uci set system.@system[0].initial_password_set=1
uci commit system
/etc/init.d/system restart

These commands should ensure that the system recognizes the password has been changed.

Feel free to reach out if you have further questions or need additional assistance.

Kind regards,

Happy upcoming holidays!

1 Like

Hello,
The command :

uci set system.@system[0].initial_password_set=1
uci commit system
/etc/init.d/system restart

doesn’t seem to works I also tried to do a full reboot and changed both
admin and root passwords with passwd command but no luck.

This topic was automatically closed after 60 days. New replies are no longer allowed.