Right, I agree with you but I don't see what's under your "your application logic should take care of the users requirements for new passwords".
Please, let's consider the following :
- user1 : basic rights, used by all the users in my php applications, cannot access to the users table,
- user2 : user1 plus users table access,
- superuser.
I use user2 to manually modify the users table to create new user accounts, give access for some of them to the private section and take care of the users requirements for new passwords.
Fine.
Next, I want to bluid a php application to manage the users table instead of me i.e users could create their own account and modify their password. I will continue to manage the flag that give access to the private section.
This application will use my user2 account...
I don't want any user to see my user2 password, so I use SetEnv in my httpd.conf to set my $_SERVER['SQL_PASS_USER_2'].
A malicious user create a php script under the intranet's public directory that use $_SERVER['SQL_PASS_USER_2'] (he knew I would use that name ;-) ) and give himself access to the private section or whatever.
What do you suggest ?...