blink359 Posted May 31, 2012 Share Posted May 31, 2012 Hi, I am trying to get the local windows username on the domain PC's on our intranet, I have tried $_SERVER['LOGON_USER'] but it doesn't seem to work, How can I go about doing this. Regards, Nathan Quote Link to comment https://forums.phpfreaks.com/topic/263418-getting-local-windows-username-on-intranet/ Share on other sites More sharing options...
Barand Posted May 31, 2012 Share Posted May 31, 2012 Disable "anonymous" access first. Then it should work. Quote Link to comment https://forums.phpfreaks.com/topic/263418-getting-local-windows-username-on-intranet/#findComment-1350025 Share on other sites More sharing options...
blink359 Posted May 31, 2012 Author Share Posted May 31, 2012 Sorry noob here, How do I do that? Quote Link to comment https://forums.phpfreaks.com/topic/263418-getting-local-windows-username-on-intranet/#findComment-1350026 Share on other sites More sharing options...
Barand Posted May 31, 2012 Share Posted May 31, 2012 If you are using IIS Control panel Administrative tools IIS manager Web site (or lower level folder if it's just for one application) Double click IIS/Authentication Change anonymous authentication from enabled to disabled Quote Link to comment https://forums.phpfreaks.com/topic/263418-getting-local-windows-username-on-intranet/#findComment-1350028 Share on other sites More sharing options...
blink359 Posted May 31, 2012 Author Share Posted May 31, 2012 Topic moving away from PhP now :/ I get 401 - Unauthorized: Access is denied due to invalid credentials. Quote Link to comment https://forums.phpfreaks.com/topic/263418-getting-local-windows-username-on-intranet/#findComment-1350039 Share on other sites More sharing options...
Barand Posted May 31, 2012 Share Posted May 31, 2012 was there a windows authorisation option that needs enabling - same screen as the anonymous option Quote Link to comment https://forums.phpfreaks.com/topic/263418-getting-local-windows-username-on-intranet/#findComment-1350040 Share on other sites More sharing options...
blink359 Posted May 31, 2012 Author Share Posted May 31, 2012 It was disabled but do you mean? If so, what do I need to do to set it up correctly? Quote Link to comment https://forums.phpfreaks.com/topic/263418-getting-local-windows-username-on-intranet/#findComment-1350041 Share on other sites More sharing options...
Barand Posted May 31, 2012 Share Posted May 31, 2012 you need to enable windows authentication http://weblogs.asp.net/scottgu/archive/2006/07/12/Recipe_3A00_-Enabling-Windows-Authentication-within-an-Intranet-ASP.NET-Web-application.aspx Quote Link to comment https://forums.phpfreaks.com/topic/263418-getting-local-windows-username-on-intranet/#findComment-1350044 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.