find files with SUID bit turned on


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers find files with SUID bit turned on
# 1  
Old 02-03-2011
find files with SUID bit turned on

I'm writing a script that will search for files with the SUID bit turned on, and put the list in a file called id.txt

i read that files with the SUID bit turned on are chmod'd to 4000, so i tried:
Code:
find / -perm 4000 > id.txt

also various others such as -perm 4777 etc etc
but it found nothing obviously. What am I doing wrong?

Last edited by pludi; 02-04-2011 at 04:21 AM..
# 2  
Old 02-03-2011
try -perm -4000
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies

2. Shell Programming and Scripting

Command to find 32/64 bit in Linux

Hi, Can somebody tell me which command will help me find whether the OS is 32 bit or 64 bit. OS is LInux Thanks (3 Replies)
Discussion started by: aish11
3 Replies

3. UNIX for Dummies Questions & Answers

what is SUID,GUID and Sticky bit?

Dear all, what is SUID,GUID and Sticky bit permission? can anyone gave me explanation with example? thanks in advance.. (2 Replies)
Discussion started by: masthan25
2 Replies

4. Shell Programming and Scripting

How to find sticky bit dir/files

I need to find all sticky bit dir/files on my system and clean them up if necessary. How to I write a script to do this? Thanks. (2 Replies)
Discussion started by: pdtak
2 Replies

5. Shell Programming and Scripting

Little bit weired : Find files in UNIX w/o using find or where command

Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same. Thanks in advance. Regards Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies

6. UNIX for Dummies Questions & Answers

How do i find if Solaris is 32 or 64 bit.

Hi, How do I find what version of solaris my Sparc system is running(32 bit or 64 bit). Can a 64 bit sparc run 32 bit solaris? Please let me know Thanks (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

7. Cybersecurity

suid files???

Hi all, Where can i find list of suid and gid files common for the system, let's say RedHat 7.1? Thank you all Regards :D (1 Reply)
Discussion started by: solvman
1 Replies

8. Programming

SUID bit???

Hi all I'm getting file info through stat( char *filename, struct stat *buf) Taking all the file attributes to buf->st_mode, How can i check the suid bit in there, if suid bit mask is 0004000?? Thank you all (1 Reply)
Discussion started by: solvman
1 Replies
Login or Register to Ask a Question