RHCSA Practical Lab Series – Configuring User Accounts

Expertise in Cloud, Networking & DevOps
Photo by Markus Spiske / Unsplash

πŸ” Lab 9: Creating a User with a Specific UID

πŸ“Œ Objective

In this lab, you will:

βœ” Create a new user (developer99) with a specific user ID (4533)
βœ” Set the password (cloudnetops123) for the new user
βœ” Verify the user creation and authentication


πŸ“Œ Step 1: Create the User with a Specific UID

πŸ”Ή Use the useradd command to create developer99 with UID 4533:

[root@node1 ~]# useradd -u 4533 developer99

πŸ“Œ Explanation:

  • useradd β†’ Creates a new user account
  • -u 4533 β†’ Assigns the specific UID 4533 to developer99

πŸ”Ή Verify the user creation:

[root@node1 ~]# id developer99

πŸ”Ή Expected Output:

uid=4533(developer99) gid=4533(developer99) groups=4533(developer99)

βœ… If UID 4533 is assigned, the user was created successfully.


πŸ“Œ Step 2: Set the User Password

πŸ”Ή Set the password for developer99 to cloudnetops123:

[root@node1 ~]# echo cloudnetops123 | passwd --stdin developer99

πŸ“Œ Explanation:

  • echo cloudnetops123 β†’ Sends the password as input
  • passwd --stdin developer99 β†’ Sets the password for developer99

πŸ”Ή Verify password change by switching to developer99:

[root@node1 ~]# su - developer99

πŸ“Œ Expected Output (After entering the password cloudnetops123):

[developer99@node1 ~]$

βœ… If the login is successful, the password has been set correctly.


πŸ“Œ Step 3: Verify the User in /etc/passwd

πŸ”Ή Check the user entry in /etc/passwd:

[root@node1 ~]# grep developer99 /etc/passwd

πŸ”Ή Expected Output:

developer99:x:4533:4533::/home/developer99:/bin/bash

βœ… If this entry exists, the user is properly configured.


βœ… Final Summary

βœ” Created a user developer99 with UID 4533
βœ” Set the password to cloudnetops123
βœ” Verified user authentication and system registration


πŸ“Œ Next Lab: Searching for Files by User Ownership

πŸ“© Subscribe for more RHCSA exam labs and hands-on tutorials! πŸš€


Read more