Problem

In this hands-on project, you observe user account databases and create a user account u...

In this hands-on project, you observe user account databases and create a user account using command-line utilities.

1. Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of secret.

2. At the command prompt, type less /etc/passwd and press Enter. Where is the line that describes the root user located in this file? Where is the line that describes the user1 user in this file? How many daemon accounts are present? What is in the password field for all accounts? When finished, press the q key to quit the less utility.

3. At the command prompt, type ls -l /etc/passwd and press Enter. Who is the owner and group owner of this file? Who has permission to read this file?

4. At the command prompt, type less /etc/shadow and press Enter. What is in the password field for the root user and user1 user accounts? What is in the password field for most daemon accounts? Press the q key to quit the less utility.

5. At the command prompt, type ls -l /etc/shadow and press Enter. Who is the owner and group owner of this file? Who has permission to read this file? Compare the permissions for /etc/shadow with those of /etc/passwd obtained in Step 3 and explain the difference.

6. At the command prompt, type pwunconv and press Enter. Next, type less /etc/ shadow at the command prompt and press Enter. What error message do you receive? Why?

7. At the command prompt, type less /etc/passwd and press Enter. What is in the password field for all accounts? Why? When finished, press the q key to quit the less utility.

8. At the command prompt, type pwconv and press Enter. What does the pwconv command do?

9. Next, type less /etc/shadow at the command prompt and press Enter. Verify that the file has contents, and press q when finished. Next, type less /etc/passwd at the command prompt and press Enter. Verify that the file has contents, and press q when finished.

10. At the command prompt, type cat /etc/default/useradd and press Enter. What is the default shell used when creating users? What is the default location of the skel directory used when creating users? Where are user home directories created by default?

11. At the command prompt, type ls –a /etc/skel and press Enter. What files are stored in this directory? What is the purpose of this directory when creating users?

12. At the command prompt, type cp /etc/inittab /etc/skel and press Enter to create a copy of the init table in the /etc/skel directory.

13. At the command prompt, type useradd –m bozo and press Enter. What does the –m option specify? From where is the default shell, home directory information taken?

14. At the command prompt, type less /etc/login.defs and press Enter. Observe the entries and descriptive comments. Did you need to specify the –m option to the useradd command in Step 13? Explain. Press the q key to quit the less utility.

15. At the command prompt, type cat /etc/passwd and press Enter. What shell and home directory does bozo have? What is bozo’s UID?

16. At the command prompt, type cat /etc/shadow and press Enter. Does bozo have a password? Can bozo log in to the system?

17. At the command prompt, type passwd bozo and press Enter. Enter the password of secret and press Enter. Enter the password of secret again to confirm and press Enter.

18. At the command prompt, type ls -a /home/bozo and press Enter. How many files are in this directory? Compare this list with the one obtained in Step 11. Is the inittab file present?

19. Type exit and press Enter to log out of your shell.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 10