Skip to main content
August 10, 2010
Question

is it possible to display windows domain details in coldfusion?

  • August 10, 2010
  • 2 replies
  • 502 views

I would like to be able to know if coldfusion is able to obtain a few details automatically about a user on a windows network.

  • The windows domain username that they are currently logged in as
  • Their computer name

Is is possible for Coldfusion to automatically retrieve these as variables?

    This topic has been closed for replies.

    2 replies

    Inspiring
    August 10, 2010

    ping -a ip address from command.com will return the machine name.  All you have to do is figure out how to put that into a batch file and retrieve the info.  Then you can call the batch file with cfexecute.

    tclaremont
    Inspiring
    August 10, 2010

    Put the following on a CF page on your server:

    #CGI.AUTH_USER#

    View the page in your browser.

    What do you get?

    Inspiring
    August 10, 2010

    Is is possible for Coldfusion to automatically retrieve these as variables?

    No.  Because CF runs on the CF server and talks solely to the web server.  It doesn't know anything about the client at the other end.

    However the web server might be able to pass this info on to CF, provided the client browser sends it to the web server in the first place.

    I've not looked at this for an age, but IE used to automatically send the client machine's current Windows authorisation credentials if the web server was set to not allow anonymous access.  However only IE did this.  And I dunno about the machine name.

    You need to approach your investigation here from the browser / web server perspective, rather than a CF perspective: you need to find out how to get the browser to send that info to the web server, and then how to get the web server to expose this to CF.

    --

    Adam