Adam Matan Asked: 2012-02-23 02:40:56 +0800 CST2012-02-23 02:40:56 +0800 CST 2012-02-23 02:40:56 +0800 CST Where is the per-user salt kept? 772 Where does Ubuntu keep the password salt for each user? encryption password 1 Answers Voted Best Answer Lekensteyn 2012-02-23T03:06:22+08:002012-02-23T03:06:22+08:00 From the manual page of shadow(5): Each line of this file contains 9 fields, separated by colons (“:”), in the following order: [..] encrypted password Refer to crypt(3) for details on how this string is interpreted. Alright, let's have a look at man 3 crypt then. From the notes section: [..] So $5$salt$encrypted is an SHA-256 encoded password and $6$salt$encrypted is an SHA-512 encoded one. "salt" stands for the up to 16 characters following "$id$" in the salt. The encrypted part of the password string is the actual computed password. So, the salt is stored in the password field of /etc/shadow itself. For more details, have a look at the manual page of crypt(3).
From the manual page of
shadow(5)
:Alright, let's have a look at
man 3 crypt
then. From the notes section:So, the salt is stored in the password field of
/etc/shadow
itself. For more details, have a look at the manual page of crypt(3).