RHCSA Practical Lab Series β Configuring User Accounts
π 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 todeveloper99
πΉ 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 inputpasswd --stdin developer99
β Sets the password fordeveloper99
πΉ 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! π