guerlando
Posts: 10
Joined: Tue Mar 15, 2016 12:38 am

What are raspberry's shadow file crypto functions?

Sun Oct 01, 2017 12:35 am

The shadow file at /etc/shadow is where I can change a user's password without any binary tool. If I edit that file, it works. I need to change that file, but I've read that different distributions uses different cryptographic hash functions. So which one raspbian uses and how to use it? If it's sha256, is it just sha256(password)?

Thank you!

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: What are raspberry's shadow file crypto functions?

Sun Oct 01, 2017 10:36 am

Take a look at it. The second field tells you the encrytion used for the password.

https://www.cyberciti.biz/faq/understan ... adow-file/

Code: Select all

dougie:$6$redactedredactedredacted/:17427:0:99999:7:::
That $6 means sha-512.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Troubleshooting”