Free LPI 102-500 Actual Exam Questions - Question 4 Discussion

Question No. 4
Which of the following commands can remove a user from a group?
Select one option, then reveal solution.
US
NM
Noah M.
2026-02-20

Makes sense to go with E since usermod is designed to modify user account settings, including group memberships. The trick is you have to specify all groups the user should stay in, leaving out the one you want removed. A and D aren’t standard commands for this, and C deals with passwords, so they’re out. B is more for changing group details, not user memberships. So, E fits best here.

0
BS
Brian S.
2026-02-19

Good points all around. I’d back E as well — usermod with the -G option actually sets the entire list of supplementary groups, so you have to list all the groups you want the user to remain in except the one you want to remove. So technically it doesn't just remove a single group but replaces the whole group membership set. None of the other options work for removing users from groups, so E is the only viable choice here.

0
SZ
Shoaib Z.
2026-02-19

E usermod can remove a user from a group by resetting their group list with the -G option, excluding the group you want to remove. The others don’t handle user-to-group removals directly.

0
MM
Mason M.
2026-02-16

B. groupmod edits group properties like name or GID, but it doesn’t handle user memberships directly, so it can’t remove a user from a group. That’s why usermod is the preferred tool here.

0
SY
Shah Y.
2026-02-13

E, since usermod lets you update a user’s group memberships directly.

0
SY
Shah Y.
2026-02-11

Yeah, groupmod is for tweaking group details, not user membership directly. usermod (E) lets you change which groups a user belongs to by updating their group list. So I'd pick E.

0
SY
Shah Y.
2026-01-30

Option B, groupmod, isn’t really meant for removing individual users from groups—it’s mostly for changing group info like the name or GID. Option E, usermod, is better since you can reset the user’s secondary groups explicitly to exclude the one you want to remove. That makes usermod the go-to for this task. The other options like passwd or usergroups don’t handle group membership directly. So based on what these commands are designed for, usermod fits best for removing a user from a group.

0
SI
Sohail I.
2026-01-28

B/E? groupmod can change group membership by adjusting the group itself, while usermod modifies the user’s group list. Both can affect user-group relations, but usermod is more direct for removing users from groups.

0
HV
Hassan V.
2026-01-25

Option E works because usermod is designed to modify a user's group memberships by resetting the list, which can exclude the unwanted group. Groupmod doesn’t handle user assignments directly.

0
HV
Hassan V.
2026-01-24

E, groupmod just tweaks group info, not user membership.

0
HV
Hassan V.
2026-01-24

I agree with tossing out A since grouprm isn’t a standard command. B (groupmod) is more for renaming groups or changing group properties, not membership. So that leaves E (usermod) as the practical option here. It’s true you have to specify the entire list of groups minus the one you want removed, but it’s still the command designed to manage user group assignments.

0
SI
Sami I.
2026-01-20

E, since usermod is the only one that actually changes group membership.

0
SI
Sami I.
2026-01-20

A imo isn’t a real Linux command, so we can toss that one out. E’s the only legit choice that actually lets you change user group membership, even if it's a bit indirect.

0
SI
Sami I.
2026-01-19

B imo doesn’t make sense here since groupmod is for modifying group properties, not user memberships. So E seems like the best fit for actually removing a user from a group.

0
AI
Arjun I.
2026-01-16

Option E - usermod can remove a user from a group using the -G option.

0