Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10

Thread: windows login

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Brisbane, Australia
    Posts
    181
    Thanks
    1
    Thanked 0 Times in 0 Posts

    windows login

    i am writing the schools intranet and i need to know if there is a script which retrieves the username of the current logged in user on the clients machine and displays it on the webpage.
    -mR_eGo
    _______________________
    Programming since
    3 years old.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Since your signature tells us that you are already programming for a really long time, you shouldn't have any problems to figure out the answer to your question yourself.

    Hint: PHP runs on the server, not on the client.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Brisbane, Australia
    Posts
    181
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i know it can be done in ASP. problem is i dont know how to do it in PHP.

    help?
    -mR_eGo
    _______________________
    Programming since
    3 years old.

  • #4
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I don't think you can

    I also program my schools intranet and I don't think that there is a way to the user that is logged on.

    I tried this as Our school was going to have the set of flash valentines cards that I made, but we needed to make sure that nothing offensive was sent in the message, so I wanted to make a tracking system that would return all offensive messages from whichever user.

    I was never able to do it.

  • #5
    New Coder
    Join Date
    Jan 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    if i know what you are saying

    it can be done.

    at work on some of our intranet sites, it says welcome (our username here), is this what you are talking about? if it is I THINK it has something to do with some of the php environmental variables like REMOTE_ADDR etc.

    maybe REMOTE_USER???

  • #6
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Maybe I got it wrong

    Can I just clarify here, Do you want it to get the username that you use to log on to the user area of the computer ( network username )

  • #7
    New Coder
    Join Date
    Nov 2002
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IIS is the trick... sorry to say..

    If you check the
    _SERVER["AUTH_USER"]

    server var it will have the domain\\user

    But you must be using IIS on a lan and have the security setting set for NO Anonymous access and check the Intergrated Windows authentication.

    Also....

    You MUST turn on keep-alives!

    IE supports this but I think netscape does not (on the client side).

  • #8
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    you can authenticate against NT user on apache using (there are a couple of others), mod_sspi when athenticated, I assume the username is available somewhere in the $_SERVER array , though I doubt that this will be set unless you get the user to authenticate in the first place?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #9
    New Coder
    Join Date
    Nov 2002
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The settings I discribe in IIS force IIS to do NTFS challange - responce authentication. If the info IE sends to the IIS box doesn't pass the authentication test, IIS pops up a login box. This allows the user to supply a different set of login info that the ones the pc used to get onto the lan.

    I have never done this with apache. Sorry can't help yea there.

    I would like to do windows authentication with apache, I will go look up some info on that module. Any good reading links out there?

  • #10
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    Hi, mod_auth_sspi info @ http://www.syneapps.com/software/mod_auth_sspi/ its apache2 only at the moment though I know there is a 1.3.* version knocking around cos I have a copy somewhere , good place (though a dodgy interface) for apache module info is http://modules.apache.org/search
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

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