Login Name

Results 1 to 5 of 5

Thread: Login Name

  1. #1
    Ashram Beachoo Guest

    Default Login Name

    I am doing a series of ASP pages for an intranet project.<BR>I would like to password protect certain areas of the site, using the PC session&#039s login name to give access.<BR>Ex. If John logged on to the PC and viewed my page, he&#039d get access, but if Dick then logged on to the same PC, he&#039d be denied.<BR>It&#039s a weak form of security but it&#039s good enough for my purposes.<BR>How do I capture the PC login name in my ASP page?<BR>I would be grateful if you&#039d post a reply and also mail a copy to me at abeachoo@petrotrin.com<BR><BR>Thank you,<BR>Ashram

  2. #2
    Join Date
    Dec 1969
    Posts
    572

    Default RE: Login Name

    Why don&#039t you have them login at the begining of the session? It&#039ll be much more efficient. But if you still want to do it your way, you can accomplish it by using ServerVariables object (ServerVariables("LOGON_USER") and <BR>ServerVariables("LOCAL_ADDR")).

  3. #3
    Ashram Beachoo Guest

    Default RE: Login Name

    Thanks Alex, but that wasn&#039t exactly what I was looking for.<BR>Those server variables are just that...server variables.<BR>What I need is the local variable which holds the username of the person who logged on to the network from the PC viewing the page.<BR>I need a way of accessing the username which the person types when the PC starts up and asks them for a login/pwd.<BR>Thats what I&#039ll be using.<BR>I know a login page would be better but I&#039m following what the users want here...I suggested it but they&#039d prefer it that way, so what can I say?

  4. #4
    Join Date
    Dec 1969
    Posts
    1,315

    Default RE: Login Name

    If this information is available to you as a web programmer, I would have serious concerns about the security of the Network (Domain) your are working on. Let me preface my explanation with, "I am not Network Specialist!". <BR>It totally depends on how the network at your customer&#039s site is set up. But what normally happens is, when you log in to your desktop, your are logging into a Domain server. This ID is your Domain ID, and should NOT be available to the Web Server Software.


  5. #5
    Nathen Grass Guest

    Default RE: Login Name

    As far as I know the information of who&#039s logged onto the machine that is accessing your site is not passed when the browser requests a page from the server. This can be accomplished but you would need to make an ActiveX control that&#039s loaded to the user&#039s machine and makes an API call to retrieve the logon user and send it back to the server. I don&#039t know how reliable this method is going to be to keep track of the actual user who is accessing your site. Say if Joe Schmoe forgets to log off of his machine and Jack Smith sits down and accesses your site you would get Joe Schmoe as the user.<BR><BR>If you just need the user who is logged into your site then you would need to use the server variable LOGON_USER just as Alex posted earlier, but you would need to set your web site security to Basic authentication so the user is challenged with the NT login prompt whenever he accesses your site. So even if Jack Smith was on a machine that Joe Schmoe forgot to log off of he would get challenged to log in when he accessed your site. Unless Joe Schmoe had already accessed your site and left the browser window open. In that case you&#039re in a no-win situation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •