Lab activity

User Account Creation

Learn how to create, configure, modify, and manage Linux user accounts using commands like useradd, usermod, passwd, and chage.

Overview

User account management is a fundamental skill for Linux administrators and an important topic for LFCS and RHCSA preparation. In this lab, you will learn how to create, modify, verify, and delete user accounts using standard Linux administration commands. You will work with commands such as useradd, usermod, id, passwd, and chage to manage user properties, login shells, home directories, account expiry settings, and passwords in a Linux environment.

In This Lab, You’ll Learn How To

  • Create and manage Linux user accounts
  • Assign custom home directories and login shells
  • Modify user account properties using usermod
  • View user information from system account files
  • Manage account expiry settings and passwords
  • Understand default user creation configurations
  • Delete users and clean up home directories

Key User Management Commands

  • useradd for creating users
  • usermod for modifying user settings
  • userdel for removing users
  • id for viewing UID and group details
  • passwd for setting passwords
  • chage for managing password and account expiry

Command Examples

Create a new user:

useradd alice

Create a user with a home directory and Bash shell:

useradd -m -s /bin/bash bob

Display user account information:

id bob

Modify a user's shell:

usermod -s /bin/bash alice

Delete a user and remove the home directory:

userdel -r bob

Learning Outcomes

  • Understand Linux user account structure
  • Create and configure users with custom settings
  • Manage passwords and account expiry policies
  • Modify and verify user account information
  • Develop practical Linux administration skills

Conclusion

Completing this lab will help you gain practical experience with Linux user account administration and configuration. You will learn how to manage user accounts securely and efficiently using standard Linux tools and configuration files.These skills are essential for Linux system administration, LFCS preparation, and managing multi-user Linux environments.