What are common user management tasks?

QuestionsQuestions8 SkillsProUser Account ManagementOct, 22 2025
075

Common user management tasks in Linux include:

  1. Creating User Accounts: Adding new users to the system using the useradd command.

    sudo useradd username
  2. Modifying User Accounts: Changing user attributes such as username, home directory, or group memberships using the usermod command.

    sudo usermod -d /new/home/directory username
  3. Deleting User Accounts: Removing user accounts from the system with the userdel command.

    sudo userdel username
  4. Changing Passwords: Updating user passwords using the passwd command.

    sudo passwd username
  5. Managing User Groups: Creating, modifying, or deleting groups and adding users to groups using groupadd, groupmod, and groupdel.

    sudo groupadd groupname
    sudo usermod -aG groupname username
  6. Setting Account Expiration: Configuring when user accounts expire using the chage command.

    sudo chage -E YYYY-MM-DD username
  7. Viewing User Information: Checking user details and group memberships with commands like id, groups, and examining /etc/passwd.

    id username
  8. Locking and Unlocking Accounts: Disabling user accounts with usermod or passwd.

    sudo usermod -L username  # Lock account
    sudo usermod -U username  # Unlock account
  9. Monitoring User Activity: Using commands like who, w, and last to track user logins and activity.

    who

These tasks are essential for maintaining user accounts, ensuring security, and managing access control in a Linux environment.

0 Comments

no data
Be the first to share your comment!