Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI Exam 102-500 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:

Geraldo
2 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
22 days ago
C) find -type suid -username root -d /usr
upvoted 0 times
...
Jani
1 months ago
B) find -user root +mode +s /usr
upvoted 0 times
...
Mitsue
1 months ago
A) find /usr -uid 0 -perm +4000
upvoted 0 times
...
...
Tonette
2 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
2 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
2 months ago
Wait, what's the SUID bit again? I need to brush up on my Linux permissions.
upvoted 0 times
Doyle
1 months ago
User 2
upvoted 0 times
...
Teddy
1 months ago
User 1
upvoted 0 times
...
...
Karan
2 months ago
I think option E is the right one. It looks more straightforward to me.
upvoted 0 times
Odette
2 months ago
I agree with you, option A seems to be the most accurate choice.
upvoted 0 times
...
Toshia
2 months ago
No, I believe option A is correct. It specifies the UID and permissions criteria clearly.
upvoted 0 times
...
Otis
2 months ago
I think option E is the right one. It looks more straightforward to me.
upvoted 0 times
...
...
Karl
3 months ago
I disagree, I believe the correct answer is E) find /usr -suid -perm +4000
upvoted 0 times
...
Rodrigo
3 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
2 months ago
D) find /usr -ls *s* -u root
upvoted 0 times
...
Layla
2 months ago
That makes sense, thanks for the explanation.
upvoted 0 times
...
Ariel
2 months ago
A) find /usr -uid 0 -perm +4000
upvoted 0 times
...
...
Samira
3 months ago
I think the answer is A) find /usr -uid 0 -perm +4000
upvoted 0 times
...

Save Cancel