473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Getting Remote Windows Username on Intranet

Hey there. I'm currently working on an intranet, and would like to
know how I can get the windows usernames of the visitors.

You can get their IP with $_SERVER['REMOTE_ADDR'];

But what about their Windows Username? Is there any way of doing so?
Through the Intranet?

Sep 29 '07 #1
8 16631
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruno Barros wrote:
Hey there. I'm currently working on an intranet, and would like to
know how I can get the windows usernames of the visitors.

You can get their IP with $_SERVER['REMOTE_ADDR'];

But what about their Windows Username? Is there any way of doing so?
Through the Intranet?
No unless you use ActiveX

- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} uk
http://www.brendangillatt.co.uk
PGP Key: http://pgp.mit.edu:11371/pks/lookup?...rch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFG/tOEkA9dCbrNdDMRArvrAJ9h0nlZp0c02kiQLeYLsdqeQyq7KwC gmu23
i531jhYaBDCV2RuGUiqlxCY=
=XHAi
-----END PGP SIGNATURE-----
Sep 29 '07 #2
On 29 Sep, 23:36, Brendan Gillatt
<brendanREMOVET...@brendanREMOVETHISgillatt.co.ukw rote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruno Barros wrote:
Hey there. I'm currently working on an intranet, and would like to
know how I can get the windows usernames of the visitors.
You can get their IP with $_SERVER['REMOTE_ADDR'];
But what about their Windows Username? Is there any way of doing so?
Through the Intranet?

No unless you use ActiveX

- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} ukhttp://www.brendangillatt.co.uk
PGP Key:http://pgp.mit.edu:11371/pks/lookup?...rch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFG/tOEkA9dCbrNdDMRArvrAJ9h0nlZp0c02kiQLeYLsdqeQyq7KwC gmu23
i531jhYaBDCV2RuGUiqlxCY=
=XHAi
-----END PGP SIGNATURE-----
Other than that? Anything?

Sep 29 '07 #3
Bruno Barros wrote:
On 29 Sep, 23:36, Brendan Gillatt
<brendanREMOVET...@brendanREMOVETHISgillatt.co.ukw rote:
>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruno Barros wrote:
>>Hey there. I'm currently working on an intranet, and would like to
know how I can get the windows usernames of the visitors.
You can get their IP with $_SERVER['REMOTE_ADDR'];
But what about their Windows Username? Is there any way of doing so?
Through the Intranet?
No unless you use ActiveX

- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} ukhttp://www.brendangillatt.co.uk
PGP Key:http://pgp.mit.edu:11371/pks/lookup?...rch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFG/tOEkA9dCbrNdDMRArvrAJ9h0nlZp0c02kiQLeYLsdqeQyq7KwC gmu23
i531jhYaBDCV2RuGUiqlxCY=
=XHAi
-----END PGP SIGNATURE-----

Other than that? Anything?
Not a chance. Not meant to be rude, but what business is it of yours? I
would be very upset if any site wanted my window user name. That's
between me and my network.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 30 '07 #4
On Sep 29, 7:36 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
Bruno Barros wrote:
On 29 Sep, 23:36, Brendan Gillatt
<brendanREMOVET...@brendanREMOVETHISgillatt.co.ukw rote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bruno Barros wrote:
Hey there. I'm currently working on an intranet, and would like to
know how I can get the windows usernames of the visitors.
You can get their IP with $_SERVER['REMOTE_ADDR'];
But what about their Windows Username? Is there any way of doing so?
Through the Intranet?
No unless you use ActiveX
- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} ukhttp://www.brendangillatt.co.uk
PGP Key:http://pgp.mit.edu:11371/pks/lookup?...rch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
iD8DBQFG/tOEkA9dCbrNdDMRArvrAJ9h0nlZp0c02kiQLeYLsdqeQyq7KwC gmu23
i531jhYaBDCV2RuGUiqlxCY=
=XHAi
-----END PGP SIGNATURE-----
Other than that? Anything?

Not a chance. Not meant to be rude, but what business is it of yours? I
would be very upset if any site wanted my window user name. That's
between me and my network.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
---

Bruno mentioned "intranet" so I think the idea is that the script
would only be looking for the username or credentials of a user who's
logged into the network.

Would this be the idea?

Integrating Active Directory with PHP
http://www.developer.com/lang/php/ar...0941_3100951_1

Sep 30 '07 #5
On 30 Sep, 04:09, klenwell <klenw...@gmail.comwrote:
On Sep 29, 7:36 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
Bruno Barros wrote:
On 29 Sep, 23:36, Brendan Gillatt
<brendanREMOVET...@brendanREMOVETHISgillatt.co.ukw rote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>Bruno Barros wrote:
>>Hey there. I'm currently working on an intranet, and would like to
>>know how I can get the windows usernames of the visitors.
>>You can get their IP with $_SERVER['REMOTE_ADDR'];
>>But what about their Windows Username? Is there any way of doing so?
>>Through the Intranet?
>No unless you use ActiveX
>- --
>Brendan Gillatt
>brendan {at} brendangillatt {dot} co {dot} ukhttp://www.brendangillatt.co.uk
>PGP Key:http://pgp.mit.edu:11371/pks/lookup?...rch=0xBACD7433
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.3 (MingW32)
>iD8DBQFG/tOEkA9dCbrNdDMRArvrAJ9h0nlZp0c02kiQLeYLsdqeQyq7KwC gmu23
>i531jhYaBDCV2RuGUiqlxCY=
>=XHAi
>-----END PGP SIGNATURE-----
Other than that? Anything?
Not a chance. Not meant to be rude, but what business is it of yours? I
would be very upset if any site wanted my window user name. That's
between me and my network.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================

---

Bruno mentioned "intranet" so I think the idea is that the script
would only be looking for the username or credentials of a user who's
logged into the network.

Would this be the idea?

Integrating Active Directory with PHPhttp://www.developer.com/lang/php/article.php/10941_3100951_1
Yes it is. I am developing a website for an Intranet and would like
the Windows Username to be the username to be used inside the intranet
(kind of automatic login).

Sep 30 '07 #6
Bruno Barros wrote:
On 30 Sep, 04:09, klenwell <klenw...@gmail.comwrote:
>On Sep 29, 7:36 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>>Bruno Barros wrote:
On 29 Sep, 23:36, Brendan Gillatt
<brendanREMOVET...@brendanREMOVETHISgillatt.co. ukwrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bruno Barros wrote:
>Hey there. I'm currently working on an intranet, and would like to
>know how I can get the windows usernames of the visitors.
>You can get their IP with $_SERVER['REMOTE_ADDR'];
>But what about their Windows Username? Is there any way of doing so?
>Through the Intranet?
No unless you use ActiveX
- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} ukhttp://www.brendangillatt.co.uk
PGP Key:http://pgp.mit.edu:11371/pks/lookup?...rch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
iD8DBQFG/tOEkA9dCbrNdDMRArvrAJ9h0nlZp0c02kiQLeYLsdqeQyq7KwC gmu23
i531jhYaBDCV2RuGUiqlxCY=
=XHAi
-----END PGP SIGNATURE-----
Other than that? Anything?
Not a chance. Not meant to be rude, but what business is it of yours? I
would be very upset if any site wanted my window user name. That's
between me and my network.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
---

Bruno mentioned "intranet" so I think the idea is that the script
would only be looking for the username or credentials of a user who's
logged into the network.

Would this be the idea?

Integrating Active Directory with PHPhttp://www.developer.com/lang/php/article.php/10941_3100951_1

Yes it is. I am developing a website for an Intranet and would like
the Windows Username to be the username to be used inside the intranet
(kind of automatic login).
OK, I misread intranet as "internet". Sorry.

The only way you can do this is with an ActiveX control. Nothing in the
browser will pass it on, and nothing on the server can look at it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 30 '07 #7
On Sat, 29 Sep 2007 14:03:36 -0700, Bruno Barros <ra*****@gmail.comwrote:
>Hey there. I'm currently working on an intranet, and would like to
know how I can get the windows usernames of the visitors.

You can get their IP with $_SERVER['REMOTE_ADDR'];

But what about their Windows Username? Is there any way of doing so?
Through the Intranet?
Well, yes, sort of, with limitations, and it's not exactly recommended. Look
up "NTLM".

If you're running IIS on Windows, turn on "Integrated Windows Authentication"
for the particular directory.

For Apache, there are a couple of other options, further depending on whether
you're on Windows or UNIX, for example, http://mod-auth-sspi.sourceforge.net/
or http://modntlm.sourceforge.net/ . (I've not been able to get the latter to
work at all with Apache 2.2 on Linux, but YMMV).

IE will respond automatically to the authentication challenge this sends, and
you'll get Windows username as one of the $_SERVER variables.

Firefox supports method, but users would have to manually modify the
"network.automatic-ntlm-auth.trusted-uris" option in about:config to trust your
intranet site, otherwise they get a prompt to re-enter their Windows username
and passwords.

Last time I checked Opera eitehr didn't have support for this, or it was still
beta, and disabled by default (and only re-enable-able through a hidden
option), so you'd better have a fallback.

If you go this route then bear in mind that it's not very widely used so you
won't have as much support from the community. The implementations are all
reverse-engineered (other than the native Windows/IIS one, obviously), so may
well have weird quirks.

Even if you did get this working, it's almost certainly best not to rely on
this as your authentication method on every page, instead to have it as an
*option* on your login page to identify and authenticate the user, and then use
your own method to keep the user logged in (sessions, cryptographically signed
cookies, the usual suspects here).

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 30 '07 #8
..oO(Bruno Barros)
>Yes it is. I am developing a website for an Intranet and would like
the Windows Username to be the username to be used inside the intranet
(kind of automatic login).
You could have a look at the proprietary NTLM authentication mechanism.

Micha
Sep 30 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Newbie | last post by:
I am a newsbie to ASP but need to get a script together that will insert the Windows Username of the local machine into an access database. I get the errors from my code below, can anyone help me...
2
by: hplloyd | last post by:
Hi I want to pick up the name of the logged in windows user for my ASP.NET application. When I use System.Environment.UserName i get ASPNET which is ofcourse not what I want when I try...
8
by: Jonathan Dixon | last post by:
I am developing an intranet and was wondering, when a user logs on is there a way to get the username of the windows account in asp.net. I have tried the following but they return the worker...
8
by: Raj Thakkar | last post by:
Hi, I am currenty working on a site for intranet. I have a user control in the header of every page that will be displayed only if people with certain username are surfing the site. These lists...
2
by: Child | last post by:
my application needs to retrieve windows username - anon authentication is OFF, auth mode in web.config is "windows". I get machine name with Dim ident As WindowsIdentity =...
5
by: nikou_70 | last post by:
I have a problem with ("auth_user") in asp,I try to use windows username and password in asp page for limitation user access to pages, but this server variable returns empty string, can you help me...
1
by: hemel | last post by:
I am going developed a web site where all user have registered with their windows username. So I want to USER NAME fild automically fillup with windows username. How can i do this? Is it possible...
4
by: orajat | last post by:
hi, I'm trying to pull the windows username with jscript and save it to ms access field in a table, but it does not work. it does show the alert with the name of the user but does not save it to...
8
by: tiijnar | last post by:
Hi, To get windows username Im using the following code. public class GetWindowUsername { public String getUser() { String userName = System.getProperty("user.name");...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.