Candidates should be able to edit text files using nano. This objective includes nano navigation, basic, inserting, editing, deleting, copying and finding text.
Description:
Candidates should be able to control file access through the proper use of permissions and ownerships.
Key Knowledge Areas
-
Manage access permissions on regular and special files as well as directories.
-
Use access modes such as suid, sgid and the sticky bit to maintain security.
-
Know how to change the file creation mask.
-
Use the group field to grant file access to group members.
Terms and Utilities
chmod umask chown chgrp
add a user temba to the system with useradd,
create a home directory with -m
set user password with passwd
adduser to group with usermod
run id temba to see if user is member of the group
add a group called finance with groupadd
make temba a group administrator with gpasswd -A
su to temba and see if you can add yourself as a member of a group with gpasswd -a
run id and see that temba is not a member of the group finance
less /etc/group and see that temba is an administrator of the group, by looking at the ::
exit the su context
create a directory /finance and copy some file to it.
change the group on /finance with chgrp -r /finance - this will make all files owned by the finance group
change the permissions on the directory and files so they are only accessible by the owner and group.
i.e chmod -R 660 /finance/* and change the directory to chmod 770 /finance
su to temba and observe that you cannot list the /finance directory or any file in it.
use the gpwasswd -a temba command to make temba a member of the group finance
observer that temba can enter the /finance directory and read files and create new ones
exit su
run groupdel finance. and do a ls -l /. Notice that the group id is displayed and not the group name.
this is because deleting a group does not change ownership of files owned by that group.
remove the /finance directory
ls /home to see temba's home director
delete temba with userdel -r, observe that the user home directory is also deleted.
Download