6.8 Linux Groups
Which command removes all secondary group memberships for specific user accounts?
- G ""
Using the groupadd -p command overrides the settings found in which file? - /etc/login.defs - /root/logins.defs - /usr/logins.txt - /etc/logins.txt
/etc/login.defs
You are attempting to delete the temp group but are unable to. Which of the following is the MOST likely cause? - The secondary group of an existing user cannot be deleted. - All users have already been deleted. - Groups cannot be deleted. - The primary group of an existing user cannot be deleted.
The primary group of an existing user cannot be deleted.
You have a group named Research on your system that needs a new password because a member of the group has left the company. Which of the following commands should you use? - groupmod -p Research - gpasswd research - gpasswd Research - newpasswd Research
gpasswd Research
Which of the following commands creates a new group and defines the group password? - groupadd -p - groupadd -g - groupadd -c - groupadd -r
groupadd -p
You are the administrator for a small company, and you need to add a new group of users to the system. The group's name is sales. Which command accomplishes this task? - addgroup -x sales - groupadd -r sales - groupadd sales - addgroup sales
groupadd sales
You have a group named temp_sales on your system. The group is no longer needed, so you should remove it. Which of the following commands should you use? - groupmod -n temp_sales - groupdel temp_sales - newgroup -R temp_sales - groupmod -R temp_sales
groupdel temp_sales
Which groupmod option changes the name of a group?
groupmod -n
You want to see which primary and secondary groups the dredford user belongs to. Enter the command you would use to display group memberships for dredford.
groups dredford
Which of the following commands is used to change the current group ID during a login session? - groupmod - newgrp - usermod - groups
newgrp
Which of the following commands removes a user from all secondary group memberships? - usermod -G "" - usermod -g - usermod -aG - usermod -G
usermod -G ""
Which of the following commands assigns a user to a primary group? - usermod -G - usermod -g - groupadd -g - groupadd - r
usermod -g
Which usermod option changes the secondary group membership?
G