RHCSA Rapid Track
In this lab, you will create a collaborative directory for pre-existing users.
Outcomes
A directory accessible by all members of the ateam group and a file created by Andy that can be modified by Alice.
Reset your serverX system.
Log into the GNOME desktop on serverX as
studentwith a password ofstudent.Open a window with a Bash prompt.
Select → → .
Become the
rootuser at the shell prompt.[student@serverX ~]$su -Password:redhatRun lab permissions setup which will create a shared group,
ateam, with two new users,andyandalice. The password for these accounts ispassword[root@serverX ~]#lab permissions setupCreate a directory in
/homecalledateam-text.[root@serverX ~]#mkdir /home/ateam-textChange the group ownership of the
ateam-textdirectory toateam.[root@serverX ~]#chown :ateam /home/ateam-textEnsure the permissions of
ateam-textallows group members to create and delete files.[root@serverX ~]#chmod g+w /home/ateam-textEnsure the permissions of
ateam-textforbids others from accessing its files.[root@serverX ~]#chmod 770 /home/ateam-text[root@serverX ~]$ls -ld /home/ateam-textdrwxrwx---. 2 root ateam 6 Jan 23 12:50 /home/ateam-textExit the root shell and switch to the user
andywith a password ofpassword.[root@serverX ~]#exit[student@serverX ~]$su - andyPassword:passwordNavigate to the
/home/ateam-textfolder (remember to open a terminal window first).[andy@serverX ~]$cd /home/ateam-textCreate an empty file called
andyfile3.[andy@serverX ateam-text]$touch andyfile3Record the default user and group ownership of the new file and its permissions.
[andy@serverX ateam-text]$ls -l andyfile3-rw-rw-r--. 1 andy andy 0 Jan 23 12:59 andyfile3Change the group ownership of the new file to
ateamand record the new ownership and permissions.[andy@serverX ateam-text]$chown :ateam andyfile3[andy@serverX ateam-text]$ls -l andyfile3-rw-rw-r--. 1 andy ateam 0 Jan 23 12:59 andyfile3Exit the shell and switch to the user
alicewith a password ofpassword.[andy@serverX ateam-text]$exit[student@serverX ~]$su - alicePassword:passwordNavigate to the
/home/ateam-textfolder.[alice@serverX ~]$cd /home/ateam-textDetermine
alice's privileges to access and/or modifyandyfile3.[alice@serverX ateam-text]$echo "text" >> andyfile3[alice@serverX ateam-text]$cat andyfile3text