Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there any way I can list all setuid binaries inside the Ubuntu respository? Or does such a list exist somewhere on the web? I have looked at the apt-get options and could not come up with a solution for the same. I'm assuming that there must be a list for the same though.

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

setuid executables are not recorded in the package metadata, so a short answer to your question would be: no, you can't. The only way to look for setuid executables in an archive would be to download every package and scan them.

However, if what you want to do is to list all setuid executables installed on your system, this command is what you are looking for:

find / -type f \( -perm -4000 -o -perm -2000 \)

Then, if you want to know where an executable comes from:

dpkg -S <file-path>

For example:

$ dpkg -S /bin/ping
iputils-ping: /bin/ping
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.