|
-
August 26th, 2002, 10:46 PM
#1
Member
LINUX group/user ID searching...
I have been trying to find a command on how to search for files with certain user group permissions. I am not having any luck so thats why I decided to come here . All I need is a command that checks user/group ID and lists the corresponding file name and location. If there is not one yet.. I will make one :P
-
August 26th, 2002, 10:55 PM
#2
The find command will do it just fine. What permissions are you wanting to search for? This will search for all SUID and SGID files and output the result to suidfiles.txt. You can play with the permissions to find the particular files you want.
/usr/bin/find / -type f \( -perm -004000 -o -perm -002000 \) -exec ls -lg {} \; 2>/dev/null >suidfiles.txt
Do what you want with the girl, but leave me alone!
-
August 26th, 2002, 11:22 PM
#3
Member
ok... heres a sample listing...
#ls -al
-rw-r--r-- 1 var_x users 0 Tue Jan 05 12:40:14 2000 file
-rw-r--r-- 1 var_x users 0 Mon Dec 25 13:00:00 2002 file2
I want to search for all files with owner/group ID equal to var_x or similar... do you understand what im trying to ask?
-
August 26th, 2002, 11:39 PM
#4
Use the command I gave you but change the -perm to -user or -group and insert the appropriate user or group to search for.
You can try something like:
/usr/bin/find / -type f -user problemchild -exec ls -lg {} \; 2>/dev/null >problemchildfiles.txt
That will search for all files with owner problemchild and output the results to a text file.
man find will tell you more.
Do what you want with the girl, but leave me alone!
-
August 27th, 2002, 12:27 AM
#5
Member
ah thanks.. that works perfect.. if you ever need help with something dont hesitate to pm me or IM me @ sjunglist187
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|