Red Hat Certified System Administrator RHCSA · Free Practice Question Medium
Question 15
Using Red Hat Enterprise Linux 9 (RHEL 9), perform the following tasks:
Create four users: babu, peter, newmen, and david.
Assign babu and peter to the 'accounting' group.
Assign newmen and david to the 'finance' group.
Show model answer
To create the users:
- sudo useradd babu
- sudo useradd peter
- sudo useradd newmen
- sudo useradd david
To create the groups and add users:
- sudo groupadd accounting
- sudo groupadd finance
- sudo usermod -aG accounting babu
- sudo usermod -aG accounting peter
- sudo usermod -aG finance newmen
- sudo usermod -aG finance david
These commands create the specified users and assign them to their respective groups.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
