LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   help with slocate (https://www.linuxquestions.org/questions/slackware-14/help-with-slocate-202834/)

plan9 07-08-2004 09:52 PM

help with slocate
 
hey there,

i am curious, is there a way to use slocate to find suid and sgid files and groups? Also, does anyone know of a list of suid files and sgid groups that should be changed?

Thanks,

-9

CartersAdvocate 07-08-2004 10:47 PM

I believe that the slocate.db file only keeps the filenames in it, not the attributes, so I don't believe you can find that info with the slocate command.

shilo 07-09-2004 03:34 PM

Find suid files:

Code:

find / -type f -perm -4000 -print
Find guid files:

Code:

find / -type f -perm -2000 -print
That should tell you what you want to know. Takes a little while, though.

keefaz 07-09-2004 03:42 PM

Don't forget the -print switch or you won't get output ;)

shilo 07-09-2004 04:50 PM

DOH!!! I'll edit that.

CartersAdvocate 07-09-2004 04:57 PM

Why does everyone alwways say you need the -print switch? Mine gives the same output with or without the -print

shilo 07-09-2004 06:01 PM

Huh?!?! Not to hijack the thread, but you are right.

keefaz 07-09-2004 06:06 PM

I would like to know your find version as mine refuse to display standart output without the -print switch, the standart error is displayed (permission denied)

[edit]
Ok, get it, with the -type switch -print is not needed

CartersAdvocate 07-10-2004 01:41 AM

Excerpt from find manpage:

Quote:

If no expression is given, the expression '-print' is used.
I don't use any of the other expressions, so I guess that's why I never need it


All times are GMT -5. The time now is 04:01 PM.