Technology Encyclopedia Home >How to create and manage user accounts on Fedora?

How to create and manage user accounts on Fedora?

Creating and managing user accounts on Fedora involves several steps. Here’s a brief overview:

Creating a User Account

  1. Open Terminal: You can find Terminal in the Applications menu.
  2. Use the useradd Command: To create a new user account, you need to use the useradd command followed by the username. For example, to create a user named john, you would type:
    sudo useradd john
    
  3. Set a Password: After creating the user account, you need to set a password for the user using the passwd command:
    sudo passwd john
    
    You will be prompted to enter and confirm the password.

Managing User Accounts

  1. Viewing User Accounts: To view all user accounts on the system, you can use the cat command on the /etc/passwd file:
    cat /etc/passwd
    
  2. Deleting a User Account: To delete a user account, use the userdel command followed by the username. For example, to delete the user john, you would type:
    sudo userdel john
    
    If you also want to delete the user's home directory and mail spool, you can add the -r option:
    sudo userdel -r john
    
  3. Modifying User Accounts: To modify user account settings, you can use the usermod command. For example, to change the user's home directory, you would type:
    sudo usermod -d /new/home/directory john
    

Example

Let’s say you want to create a new user named emma and set a password for her:

  1. Open Terminal.
  2. Create the user account:
    sudo useradd emma
    
  3. Set a password for emma:
    sudo passwd emma
    
    Enter and confirm the password when prompted.

Cloud-Related Recommendation

If you are managing user accounts for a cloud-based application or service, consider using Tencent Cloud’s Identity and Access Management (IAM) service. IAM allows you to create, manage, and control access to your cloud resources securely. It provides fine-grained access control, enabling you to define who can access your resources and what actions they can perform.

By using Tencent Cloud IAM, you can centralize user management, enforce security policies, and simplify compliance with regulatory requirements.