I'm writing an audit script to find all files with SUID & SGID bit set on the system, using the below command:
find / perm /u=s,g=s
The script will run with a non-root user. Will this user be able to (have permission) to search for all files with SUID/SGID bit set?
If not which specific permission would need to be granted to the user to accomplish this?
The Script would be run mainly on an RHEL system.
man sudoers
to configure your user to be able to invoke said script as root and without password. But make sure that your script allows for no escape into an interactive shell of any kind. – 0xC0000022L May 26 '15 at 15:47