LAB: Password storage on Kali/Ubuntu/Debian Linux

Let's make a new user account and take a look at how its password is stored.

Some of the relevant commands will require sudo. (How can you tell which ones?)

Do the following, and then we'll debrief for a few minutes.


Your Carleton user name, lower case:

Create a new user in Kali (e.g., adduser kermit). What does the new folder /home/kermit contain?

Look at the portion of /etc/passwd devoted to your new account. What command(s) do you use to do so, and what do you see?

Look at the portion of /etc/shadow devoted to your new account. What command(s) do you use to do so, and what do you see?

Change the user's password (e.g., passwd kermit).

What (if anything) has changed in /etc/passwd and /etc/shadow?

Select and copy the salt portion of the shadow file for your new account. It should be something like $y$j9T$blahblah up to but not including the next dollar sign. Then execute mkpasswd -S 'SALT_GOES_HERE' LATEST_PASSWORD_GOES_HERE. Does the result match the entry in the shadow file?

Why did that mkpasswd command need single-quotes around the salt?