Have to get through with the disclaimer before continuing:

Do not void your warranty, please understand that SSH access can void your warranty. Im not responsible for any damages that might occur.

PROBLEM AT HAND:

This article explains How to change the password of the admin and root user in the readynas from the backend. This should work on Readynas with firmware 4.x, 5.x, and 6.x.

SIMPLE WAY:

Anyhow to change the password:

Note: you can test your new password with:  ssh root@localhost , after confirming type   exit  to get back to your old shell (which will for all intensive purposes look the same)

Note: in the Readynas the admin and root password always match (so when you change the password from the GUI, the system essentially does the above 3 commands)

Note: the admin user has a samba account (thus there is an entry in the samba trivial database); the samba password also has to be changed with smbpasswd to match the regular admin (and root password) to be consistent.

If you need to include them in a script. There are 2 ways, 1 way using passwd, and another way using chpasswd.

#SCRIPT1 – using passwd

#SCRIPT2 – using chpasswd

Note: You can change Password123 with $VARIABLE if you want to use variables, or even ${VARIABLE} just do some experimenting.

Note: Why need to change smbpasswd admin and passwd admin, because samba uses different files for storing users then the system. Check out the trivial database: samba trivial database

Leave a Reply

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