New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI 102-500 Exam - Topic 7 Question 115 Discussion

Actual exam question for LPI's 102-500 exam
Question #: 115
Topic #: 7
[All 102-500 Questions]

What is true regarding the command userdel --force --remove bob? (Choose TWO correct answers.)

Show Suggested Answer Hide Answer
Suggested Answer: A, B

The command userdel --force --remove bob is used to delete the user account named bob and all its associated files. The --force option forces the removal of the user account, even if the user is still logged in.The --remove option forces userdel to remove the user's home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user12. Therefore, options A and B are true regarding this command.

The other options are not true because:

Option C is false because the locate database is not updated by the userdel command.The locate database is updated by the updatedb command, which is usually run by cron as a scheduled job3.

Option D is false because the userdel command does not remove all files owned by bob from all mounted filesystems. The userdel command only removes the user's home directory and mail spool, and it does not search for and delete the user files located in other file systems.You have to search for and delete the files manually1.

Option E is false because the userdel command does not delete the group with the same name as the user, unless the USERGROUPS_ENAB parameter is set to yes in the /etc/login.defs file and the group has no other members14.


How to Delete/Remove Users in Linux (userdel Command) | Linuxize

userdel(8) --- Linux manual page

updatedb(8) --- Linux manual page

Understanding the /etc/login.defs File | Linuxize

Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel