I have a strange requirement that I have a webserver setup with http basic auth pass the user's name and / or password Any way to do a user enters the shell script with the environment?
I know that Apache has this information because I can see it in the If you have PHP, then this information is available in $ _SERVER Super Global, so that you can do this: access_log and
error_log files. I am mainly interested in username, so I can store it in a txt files on a certified login
file_put_contents ('/ path / to / log / file', $ _SERVER ['REMOTE_USER']. "\ N", FILE_APPEND);
No comments:
Post a Comment