4.2 Access Controls Flashcards
A _______is a cryptographic function that takes data as input and translates it to a string of different, random-looking data.
A hash is a cryptographic function that takes data as input and translates it to a string of different, random-looking data.
How do password hashes work?
The hash is stored in the shadow file
When a user logs in, the hash of the submitted password is compared to the hash stored in etc/shadow.
If the hashes match, the user’s logged in.
_________ allows us to change the number of days between password changes for each user.
chage allows us to change the number of days between password changes for each user.
Some common options to use with chage:
chage -l
chage -M
chage -W
chage -d 0
chage -l Shows the account aging info.
chage -M Sets the number of days between password expirations.
chage -W Sets the number of warnings the user gets before the change must be made.
chage -d 0 Forces an immediate password change.
Why do some commands require sudo and others don’t?
- Users
Every file and program on
a Linux system has permissions. These permissions tell the system which users can access a file or run a program. - Groups
Users can be placed in groups, which can have their own permissions. - Root
File and program permissions apply to all
users except the root. The root user (or super user) has complete access to the system and can perform any task.
What does sudo stand for?
superuser do
sudo (superuser do) can grant a user root privileges for one command.
_________ can also control which commands the user can run as root.
sudo can also control which commands the user can run as root.
What do these commands do?
whoami
su
sudo
sudo -l
visudo
whoami – Determines the current user.
su – Switches to another user, in this case the root user.
sudo – Invokes the root user for one command only.
sudo -l – Lists the sudo privileges for a user.
visudo – Edits the sudoers file.
Linux has the ability to create _______ of users for functions like file and service sharing.
Linux has the ability to create groups of users for functions like file and service sharing.
If a company has different departments, like Sales, Accounting, and Marketing, a Linux admin can create a group for each
department. Only users in each group can access files owned by the group.
Linux identifies users and groups in the system using the _______ command:
Linux identifies users and groups in the system using the id command.
Linux associates a specific number with each user, known as the _______.
Linux associates a specific number with each user, known as the user ID (UID).
True or False?
When Linux needs to identify a user, it uses the UID, not the username.
True
When Linux needs to identify a user, it uses the UID, not the username.
True or False?
System users have a UID that is grater than 1000.
False
System users have a UID that is less than 1000.
True or False?
Standard users have a UID that is less than 1000.
False
Standard users have a UID that is greater than 1000.
True or False?
The root user always has the UID of 0.
True
The root user always has the UID of 0.