Unit 7: User and Group Administration - Subjective Questions

CSE105 — Creative Engineering Workshop • Practice Questions with Detailed Answers

20 questions

1

Define a user account in Linux. Explain the difference between a system account and a normal user account.

2

Explain the purpose and syntax of the useradd command. Describe at least four commonly used options with examples.

3

Describe the usermod command in detail. How can it be used to modify user attributes such as group membership, home directory, and shell?

4

Explain the userdel command. What is the significance of the -r option, and what precautions should be taken while deleting a user?

5

Describe the structure of the /etc/passwd file. Explain each of its seven fields with an example entry.

6

Explain the structure of the /etc/group file. How does it define group memberships in Linux?

7

Distinguish between a primary group and a secondary (supplementary) group. Explain how each is assigned to a user.

8

Explain the groupadd, groupmod, and groupdel commands with syntax and examples for each.

9

Describe the passwd command and explain how password management works in Linux. Include options for locking, expiring, and forcing password changes.

10

Explain the /etc/shadow file and its importance. Describe its major fields and how it enhances security compared to /etc/passwd.

11

Compare the useradd and adduser commands. Why might an administrator prefer one over the other?

12

A user's supplementary groups were accidentally overwritten. Explain what likely caused this and demonstrate the correct way to add a user to multiple groups without losing existing memberships.

13

Explain the significance of UID 0 in Linux. What are the security implications of a non-root account having UID 0?

14

Describe the role of the /etc/skel directory in user account creation. How does it relate to the useradd command?

15

Explain the chage command and its role in password aging. Describe at least four options with examples.

16

Illustrate the complete lifecycle of a user account in Linux — from creation to deletion — including relevant commands and the files affected at each stage.

17

Distinguish between the /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow files by tabulating their purpose, content, and permissions.

18

Explain the concept of account locking in Linux. Compare the different methods (usermod -L, passwd -l, setting shell to /sbin/nologin) and their effects.

19

Describe how default values for new users are configured in Linux. Explain the role of the /etc/login.defs and /etc/default/useradd files.

20

A company requires a shared project directory accessible by a team. Explain step-by-step how you would create a group, add users, and configure the directory with appropriate group ownership and permissions (including the SGID bit).