简体   繁体   中英

Python/CGI on IIS - find user ID

I have a very basic CGI based front end hosted on an IIS server. I'm trying to find the users within my shop that have accessed this site. All users on the network sign on with their LAN (Windows) credentials and the same session would be used to access the site.

The python getpass module (obviously) returns only the server name so is there a way to find the user names of the visitors to the site?

The stack is Python 2.7 on IIS 8.0, Windows Server 2012

When using Windows authentication on IIS, the server variables should contain the username in two variables: AUTH_USER and REMOTE_USER

CGI offers access to all server variables, check your Python docs on how to access them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM