Topic 5: Security and File Permissions Flashcards
what information is stored in the /etc/passwd folder? 6 things
username, info about a user’s password, UID, GID, home directory, and command shell
what commands could you use to show a user’s group membership?
id user_name
groups user_name
cat /etc/group | grep user_name
what command would you use to delete a user?
userdel user_name
What happens to a link when a symbolic link’s target is deleted?
the link persists to the target’s old location
what is the UID and GID of a root user?
zero
what are 3 characteristics of a standard user account?
the UID starts at 1,000
there is a defined home directory and subdirectory
has a defined login shell - usually bash
what are three characteristics of a system user account?
do not have a dedicated home directory
no valid login shell - /sbin/nologin
UID & GIDs are usually under 100
what does the command last do?
prints the entries of successful login attempts made by users
purpose of the command who
lists active login on the system
purpose of the command “w”
lists active logins on the system, current time and how long system has been up, how many users are connected, load averages, total CPU utilization times, and current process
purpose of command su
allows you to login as another user & you would need their password
purpose of command sudo
elevates current user’s privileges for a very short period of time
what does this folder contain: /etc/group
a list of every user group on the system and their secondary groups
what does this folder contain: /etc/shadow
this is where user passwords are stored
-minimum password, max password age, password expiration warning, date of last password change
purpose of the command id
provide info about a user’s identity and names of the groups they belong to