1/326
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Which command sets "other" permissions to r-x?
chmod o=rx file
Which command sets "other" permissions to r-x?
chmod o=rx file
Which command sets "other" permissions to r-x?
chmod o-r-w file
Which command sets "other" permissions to r-x?
chmod o=r+x file
Which numeric chmod sets "other" to r-x?
chmod 775 file
Only one set (user, group, other) can be changed at once using symbolic method.
False
Which methods can chmod use? (2)
octal; symbolic
The chown command can change both owner and group.
True
The user sysadmin can read a file because they own it.
True
The user sysadmin can change permissions because they own it.
True
Octal values for permissions
r=4, w=2, x=1
Which permissions allow all users to add, view, delete in a directory?
777
A user cannot delete a file if they do not own it.
False
Execute permission on a directory allows (3)
cd into directory; use in path; create files with write
Execute permission on a file allows you to
run the file as a script
Who can use chgrp on a file?
file owner and root
Who can change user ownership with chown?
only root
Who can use chmod on a file?
file owner and root
Execute permission is never set by default on files.
True
Which commands set owner to sam and group to administrators?
chown sam.administrators myFile; chown sam:administrators myFile
Changing group ownership with chown is root only.
False
File owner always has same or higher permissions than others.
False
Which command lists hidden files with ownership?
ls -la
The /tmp directory allows any user to create temporary files.
True
Sticky bit purpose
prevents deleting files you don’t own in shared directories
Set sticky bit on /shared
chmod 1777 /shared
Setuid allows
run command as file owner
Set setuid on /usr/bin/program
chmod 4755 /usr/bin/program
Setgid allows (2)
run as group owner; new files inherit directory group
Set setgid on /shared
chmod 2777 /shared
Which listing shows setgid on directory?
drwxrwsrwx
Effect of setgid on directory
new files inherit directory group
Deleting source breaks hard link.
False
Hard link must be on same filesystem.
True
Deleting source breaks symbolic link.
True
Symbolic link must be on same filesystem.
False
Create a hard link
ln file link
Create a symbolic link
ln -s file link
Which ls commands show directory itself only? (2)
ls -ld; ls -d
Which directories allow any user temp files? (2)
/tmp; /var/tmp
Which files contain user account information? (choose two)
/etc/passwd /etc/shadow
Which user can view the /etc/shadow file?
The root user
Which command will display the UID, GID and groups your current user belongs to?
id
Each user belongs to at least one group. True or False?
True
Which command will display the users that are currently logged in to the system?
who
The sudo command allows regular users to…
…execute commands as another user.
Which of the following commands will display the group(s) a user belongs to?
id
Which of the following commands will display the groups that the user bob belongs to?
id bob
The /etc/group file follows what structure?
group_name:password_placeholder:GID:user_list
A GID is associated with a group name. True or False?
True
A user can belong to…
At least 16 groups
Sudo privileges can be used to specify which user can use the sudo command to execute commands as other users. True or False?
True
In distributions that do not allow the root user to login directly or via the su command… True or False?
True
Which of the following commands will display how long the system has been running since the last boot? (choose two)
uptime w
The /etc/shadow file contains plain-text passwords. True or False?
False
Which command can be used to view the /etc/passwd file entries?
getent
All Linux systems allow administrators to log in as root. True or False?
False
What is the default user for the su command?
The root user
Which command would allow a user to execute commands as root?
sudo
File permissions cannot be edited by the root user. True or False?
False
Which command is used to display only the user’s primary group?
id -g
Traditional UNIX systems allowed users to belong to how many groups?
16
What would an account with the UID 376 typically be used for?
System service access.
Usernames cannot be the same as group names. True or False?
False
To display the group(s) a user belongs to, use this command:
id
Which command will display the groups that the root user belongs to?
id root
Value of 0 in the “minimum” password aging field means the user cannot change their password. True or False?
False
The “Epoch” began on January 1, 1970. True or False?
True
The last command displays reboot records…
By default
Sudo privileges allow users to execute commands as another user. True or False?
True
When using sudo, the command prompts for the user’s own password. True or False?
True
The first line of this command displays uptime since reboot.
w
The /etc/shadow file contains encrypted passwords. True or False?
True
Which command can be used to view the /var/log/wtmp file entries?
last
UIDs 1-499 are usually reserved for what kind of users?
System accounts, such as server processes
If a user is deleted, the files and directories that the user owned…
…will show a UID as the owner, but not user name.
Which option for useradd specifies UID?
-u
Which option for useradd specifies supplementary groups?
-G
On a system that does not use UPG… True or False?
True
Which command adds group extra to bob’s secondary groups (without removing others)?
usermod -aG extra bob
Which options for usermod specify group IDs? (choose two)
-G -g
For non-root users, passwd can only change their own password. True or False?
True
groupmod can change a group name. True or False?
True
groupmod can change a group GID. True or False?
True
groupmod can add users to a group. True or False?
False
Which command modifies a group?
groupmod
Which command shows most recent logins?
last
Which file contains encrypted user password info?
/etc/shadow
Which file contains user IDs?
/etc/passwd
Which file does groupadd use to determine new GID?
/etc/group
Which command prevents bob from logging in?
usermod -L bob
What directory contains user home directories?
/home
GIDs under 500 (or 1000) are reserved for what?
System use
If a user is deleted, files they owned…
…may be important for others in the organization
Which option sets a different primary group in useradd?
-g
On a system using UPG, UID must not equal GID. True or False?
False
Which option unlocks a user account?
-U
Which option sets login shell in useradd?
-s
Which command adds extra group to jane (keeping others)?
usermod -aG extra jane
Which option sets primary group ID in usermod?
-g