RHCSA Rapid Track
In this lab, you will add users to newly created supplementary groups.
Outcomes
The shakespeare group consists of juliet, romeo, and hamlet. The artists group contains reba, dolly, and elvis.
Perform the following steps on serverX unless directed otherwise.
Become the
rootuser at the shell prompt.[student@serverX ~]$su -Password:redhatCreate a supplementary group called
shakespearewith a group ID of30000.[root@serverX ~]#groupadd -g 30000 shakespeareCreate a supplementary group called
artists.[root@serverX ~]#groupadd artistsConfirm that shakespeare and artists have been added by examining the
/etc/groupfile.[root@serverX ~]#tail -5 /etc/groupreba:x:1004: dolly:x:1005: elvis:x:1006: shakespeare:x:30000: artists:x:30001:Add the juliet user to the shakespeare group as a supplementary group.
[root@serverX ~]#usermod -G shakespeare julietConfirm that juliet has been added using the id command.
[root@serverX ~]#id julietuid=1001(juliet) gid=1001(juliet) groups=1001(juliet),30000(shakespeare)Continue adding the remaining users to groups as follows:
Add romeo and hamlet to the shakespeare group.
[root@serverX ~]#usermod -G shakespeare romeo[root@serverX ~]#usermod -G shakespeare hamletAdd reba, dolly, and elvis to the artists group.
[root@serverX ~]#usermod -G artists reba[root@serverX ~]#usermod -G artists dolly[root@serverX ~]#usermod -G artists elvisVerify the supplemental group memberships by examining the
/etc/groupfile.[root@serverX ~]#tail -5 /etc/groupreba:x:1004: dolly:x:1005: elvis:x:1006: shakespeare:x:30000:juliet,romeo,hamlet artists:x:30001:reba,dolly,elvis