NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
douglaswyatt
Sep 03, 2014Aspirant
Manually setting password hashes
Not sure if this is the right place to post this, but I've got a possibly strange question. I'd like to be able to manually set the password hash for users, and I'm not sure if the ReadyNAS OS 6 supports sha512 hashes, or if I'm doing something else wrong. I want to do this because I'd like a user's password to be the same on the ReadyNAS as it is on another Linux box, without having them have to set their passwords twice. I ssh'd in to the box, made /etc/shadow writable, and edited a user's entry to include a password hash created on a different machine (CentOS). It didn't work - I see "FAILED with error NT_STATUS_WRONG_PASSWORD" in the log files. But I noticed that the passwords in /etc/shadow start with a $1 prefix, indicating that they are MD5 hash, while the password I pasted starts with a $6, indicating it's a SHA512 hash. Looking in the /etc/pam.d/common-password file, it appears that SHA512 is the hash of choice for the ReadyNAS:
So I've got two questions:
First, why does it appear that the ReadyNAS is creating MD5 hashes instead of SHA512?
Second, why doesn't it seem to like my cut-and-pasted SHA512 password hashes created on another Linux box?
Thanks!
# Explanation of pam_unix options:
#
# The "sha512" option enables salted SHA512 passwords. Without this option,
# the default is Unix crypt. Prior releases used the option "md5".
[...]
#password [success=1 default=ignore] pam_unix.so obscure sha512
password [success=1 default=ignore] pam_unix.so sha512
So I've got two questions:
First, why does it appear that the ReadyNAS is creating MD5 hashes instead of SHA512?
Second, why doesn't it seem to like my cut-and-pasted SHA512 password hashes created on another Linux box?
Thanks!
3 Replies
Replies have been turned off for this discussion
- mdgm-ntgrNETGEAR Employee RetiredYou would need to use smbpasswd to change the password for samba I think.
I'm not sure if these changes would survive a reboot. You may also need to edit the readynasd database. - douglaswyattAspirantAh, yes. should have thought of that. I'm used to samba installations that share passwords out of /etc/passwd|shadow. Is there a way to edit the readynasd database? Or am I asking to do something that is fighting too much of the readynas structure?
- mdgm-ntgrNETGEAR Employee RetiredThat is maintained using the sqlite3 command.
You can check if the information is in the database or not by downloading the logs and looking in db.dump
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!