I want to run a command, e.g., a python script or even "mysql" command, only after finding out at run time if the user is qualified based on some validation, to run the command or not. If not, it will exit with a failure to the user. If valid, then the command will continue its actual course.
Tried catching the LD_PRELOAD based execve catch as well as through auditd, but the attempts have been unsuccessful till now.