In: Computer Science
This lab will explore the password files.
a) Open a terminal window and type less /etc/passwd. Which line
describes the root account?
b) Type ls –l /etc/passwd. Who is the owner of the passwd file?
What are the permissions?
c) Type less /etc/shadow. What is in the password filed for most of
these accounts?
d) Type ls –l /etc/shadow. Who owns this file and how do the
permissions differ from the /etc/passwd file?
e) Type cat /etc/default/useradd. What is the default directory
used when creating users?
f) To create a new user type sudo useradd –m Tim.
g) After the user is created type cat /ect/passwd. What UUID does
Tim have?
h) Give Tim a password. Type passwd Tim. Enter the password
twice.
i) Try to login as your new user. Did it work? Log back in as
yourself.
j) Describe the difference between the passwd and shadow files. Why
was the passwords split into two files?
a)
b)
c)
d)
f and g) 2344
h) password = Game1
i) Yes, it worked with the new password = Game1
j) passwd gives user account details, shadow gives user password details. It has 2 files because one is passed file and another is shadow file.