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 3 Question 104 Discussion

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

Which of the following find commands will print out a list of files owned by root and with the SUID bit set in /usr?

Show Suggested Answer Hide Answer
Suggested Answer: A

This command will find all the files in the /usr directory that have the user ID (UID) of 0, which is the root user, and have the permission of 4000, which is the SUID bit. The SUID bit allows the file to be executed with the privileges of the file owner, regardless of who runs it. The -uid option tests for a specific UID, and the -perm option tests for a specific permission. The + sign before the permission means that at least those bits are set; the - sign means that exactly those bits are set. The other options are either invalid or do not match the criteria.Reference:

LPIC-1 Exam 102 Objectives, Topic 104: Devices, Linux Filesystems, Filesystem Hierarchy Standard, 104.4 Find system files and place files in the correct location, Key Knowledge Areas: Search for files by type, size, or time

find manual page, -uid and -perm options description

Find Command in Linux with Practical Examples, Example 8: Find Files with SUID and SGID Permissions


Contribute your Thoughts:

0/2000 characters
Pete
2 months ago
C is just confusing, not sure what they were thinking.
upvoted 0 times
...
Lucina
2 months ago
Wait, can you really use +4000 like that? Seems off.
upvoted 0 times
...
Azalee
3 months ago
B is definitely wrong, it’s not valid syntax.
upvoted 0 times
...
Ellsworth
3 months ago
I think E looks good too.
upvoted 0 times
...
Norah
3 months ago
A is the correct command!
upvoted 0 times
...
Solange
3 months ago
I remember that the SUID bit is important, but I can't recall if -suid is the right flag in option E. It feels a bit off to me.
upvoted 0 times
...
Tijuana
4 months ago
I practiced a similar question where we had to find files by user and permissions. I think the syntax in option B is off, though.
upvoted 0 times
...
Arthur
4 months ago
I'm not entirely sure, but I feel like the SUID bit is represented by +4000 in the permissions. Maybe option E is correct?
upvoted 0 times
...
Tequila
4 months ago
I think option A looks familiar; I remember it uses -uid for user ID, which should be 0 for root.
upvoted 0 times
...
Kenneth
4 months ago
I've got this! The key is to use the -uid and -perm options to find the files owned by root with the SUID bit set. I'm pretty confident that option A is the right answer.
upvoted 0 times
...
Stephanie
4 months ago
Ah, this is a tricky one. I'm not familiar with all the different find command options, so I'll need to review my notes and try to figure out the correct syntax.
upvoted 0 times
...
Lettie
5 months ago
Okay, let's see. I know I need to look for files owned by root with the SUID bit set in the /usr directory. I think option A might be the right one, but I'll double-check the syntax just to be sure.
upvoted 0 times
...
Lorrine
5 months ago
Hmm, I'm not too sure about this. The different options for the find command are a bit confusing to me. I'll need to think this through carefully.
upvoted 0 times
...
Latia
5 months ago
This looks like a straightforward find command question. I think I can handle this one.
upvoted 0 times
...
Geraldo
9 months ago
Haha, this question is a real head-scratcher. I bet the exam writer has a twisted sense of humor.
upvoted 0 times
Nydia
8 months ago
C) find -type suid -username root -d /usr
upvoted 0 times
...
Jani
8 months ago
B) find -user root +mode +s /usr
upvoted 0 times
...
Mitsue
8 months ago
A) find /usr -uid 0 -perm +4000
upvoted 0 times
...
...
Tonette
9 months ago
I'm not sure, but I think option B) find -user root +mode +s /usr could also be a possibility
upvoted 0 times
...
Audra
9 months ago
Option D is the way to go. The \*s\* pattern will definitely find all the SUID files, right? *winks*
upvoted 0 times
...
Cecilia
9 months ago
Wait, what's the SUID bit again? I need to brush up on my Linux permissions.
upvoted 0 times
Doyle
8 months ago
User 2
upvoted 0 times
...
Teddy
8 months ago
User 1
upvoted 0 times
...
...
Karan
9 months ago
I think option E is the right one. It looks more straightforward to me.
upvoted 0 times
Odette
9 months ago
I agree with you, option A seems to be the most accurate choice.
upvoted 0 times
...
Toshia
9 months ago
No, I believe option A is correct. It specifies the UID and permissions criteria clearly.
upvoted 0 times
...
Otis
9 months ago
I think option E is the right one. It looks more straightforward to me.
upvoted 0 times
...
...
Karl
10 months ago
I disagree, I believe the correct answer is E) find /usr -suid -perm +4000
upvoted 0 times
...
Rodrigo
10 months ago
The correct answer is A. The find command with the -uid 0 and -perm +4000 options will list files owned by root with the SUID bit set.
upvoted 0 times
Celia
9 months ago
D) find /usr -ls *s* -u root
upvoted 0 times
...
Layla
9 months ago
That makes sense, thanks for the explanation.
upvoted 0 times
...
Ariel
9 months ago
A) find /usr -uid 0 -perm +4000
upvoted 0 times
...
...
Samira
10 months ago
I think the answer is A) find /usr -uid 0 -perm +4000
upvoted 0 times
...

Save Cancel