Safe way to read /etc/shadow file?
Hello,I have written a perl script to validate a cpanel username & password against /etc/shadow.
I tested the script as root and everything works fine.
Now I want to run the script via the web (using php and most probably java), but am obviously unable to read the shadow file since the script is executed as nobody or as tomcat.
Does anyone have any idea about how I can read the file from the web, without making tomcat part of the 'root' group. I have also disable su... so putting that in the script will not do the trick.
Your help is appreciated.
Lamp