Linux - Copied from midterm review (answers) Flashcards
(41 cards)
For hardening purposes, what is the primary benefit of having the file /etc/shadow?
It stores encrypted user passwords, making them unreadable directly.
Which of the following represents the symbolic permission to give the owner read and write access, the group only read access, and others no access?
u=rw,g=r,o=-
If a Linux file has the permissions -rw-r–r–, who has the ability to write to the file?
Only the owner
Which of the following files contains encrypted passwords of users?
/etc/shadow
Setting the ‘s’ bit on a file in the user ownership does which of the following:
All processes created using that file run with the user ownership of the command file
To be able to change into directory Dir1, what is the minimum permissions necessary for the Dir1 directory?
Execute (x)
What is the octal permission of a directory that allows the owner to access files if they know their names, but not to list or to change the file names?
100
Setting the ‘s’ bit on a directory in the group ownership does which of the following:
All files created in that directory will have the same group ownership as the parent directory
The UID and GID for a user can be found in which file?
/etc/passwd
The /etc/group file contains information about:
Group memberships
For system hardening purposes, how can an administrator restrict a specific user from using the sudo command to gain superuser privileges?
Explicitly deny the user in the /etc/sudoers file or associated configurations.
In the context of Linux access controls, what does DAC stand for?
Discretionary Access Control
Setting the ‘s’ bit on a file in the group ownership does which of the following:
All processes created using that file run with the group ownership of the command file
In an empty directory, you run the commands: touch ??? * ; chmod 111 * chmod 444 ??? ; chmod 666 ‘*’ ; chmod 333 * What permissions are on file ??? after above commands?
-wx -wx -wx
What is the octal mode of a directory that allows only the user to cd into it and list the names in it and create any new files?
700
Which command is used to change the ownership of a file in Linux?
chown
Which of the following commands is used to show the user’s own identity and group information?
id
Which of the following commands can be used to change the ownership of a file in Linux?
chown
Which file in Linux contains the encrypted passwords of users?
/etc/shadow
Which command is used to modify an existing user’s information in Linux?
usermod
Which of the following commands is used to change a user’s default login shell?
chsh
In the file /etc/group, what does the last field represent?
List of users
What is the easiest way for root to allow a regular user in Red Hat Enterprise Linux to run any administrator commands with sudo?
Add the user to the wheel group
What value of umask gives the permissions below to a new file: rw-rw-r–
2