473,473 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

display logged in USER in textbox ?

Is it possible to display the logged in user that is accessing the
form, in a textbox?

so say I have txtname I want to display the username of the person
that is logged in to the PC in that box, can I do this?

How would this be done?

Nov 5 '07 #1
15 2633
On Mon, 05 Nov 2007 17:59:40 +0100, <pa*****@excite.comwrote:
Is it possible to display the logged in user that is accessing the
form, in a textbox?
If you control the 'being logged in to the website' with PHP or with Basic
HTTP authentication, then yes.
so say I have txtname I want to display the username of the person
that is logged in to the PC in that box, can I do this?
How would this be done?
Hardly on the www. You should not want to know my username. On intranets,
you could use some ActiveX, nothing to do with PHP/not something PHP can
do though.
--
Rik Wasmus
Nov 5 '07 #2
On Nov 5, 12:03 pm, "Rik Wasmus" <luiheidsgoe...@hotmail.comwrote:
On Mon, 05 Nov 2007 17:59:40 +0100, <paul...@excite.comwrote:
Is it possible to display the logged in user that is accessing the
form, in a textbox?

If you control the 'being logged in to the website' with PHP or with Basic
HTTP authentication, then yes.
so say I have txtname I want to display the username of the person
that is logged in to the PC in that box, can I do this?
How would this be done?

Hardly on the www. You should not want to know my username. On intranets,
you could use some ActiveX, nothing to do with PHP/not something PHP can
do though.
--
Rik Wasmus
OK thanks. Yes this would be on an intranet. I'll do that, look up
some activex controls.

Nov 5 '07 #3
pa*****@excite.com wrote:
>Is it possible to display the logged in user that is accessing the
form, in a textbox?

so say I have txtname I want to display the username of the person
that is logged in to the PC in that box, can I do this?
Computers that run web browsers do not necessarily have the concept of
"logging in". Windows 98 and Windows CE are two of the most common
examples of systems that don't.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Nov 6 '07 #4
Rik Wasmus pisze:
On Mon, 05 Nov 2007 17:59:40 +0100, <pa*****@excite.comwrote:
>
Hardly on the www. You should not want to know my username. On
intranets, you could use some ActiveX, nothing to do with PHP/not
something PHP can do though.
oh please.

of coure you can do that , and not through some active X
There is a normal way to do that. the question is only what kind of
serwer you are using for the web (apache ,iis )and what kind of serwer
for the local net (nt, samba, so on)
with microsoft serwer it is done in almost no time
with apache you need additional module

http://modntlm.sourceforge.net/

then logged user sid should be visible in $_SERVER variable

then you have to chceck the user id in LDAP to get the name to display

the end
z.

Nov 6 '07 #5
zdzisio wrote:
Rik Wasmus pisze:
>On Mon, 05 Nov 2007 17:59:40 +0100, <pa*****@excite.comwrote:
>>
Hardly on the www. You should not want to know my username. On
intranets, you could use some ActiveX, nothing to do with PHP/not
something PHP can do though.

oh please.

of coure you can do that , and not through some active X
There is a normal way to do that. the question is only what kind of
serwer you are using for the web (apache ,iis )and what kind of serwer
for the local net (nt, samba, so on)
with microsoft serwer it is done in almost no time
with apache you need additional module

http://modntlm.sourceforge.net/

then logged user sid should be visible in $_SERVER variable

then you have to chceck the user id in LDAP to get the name to display

the end
z.

Sorry, that's a login module for Apache. It tells you who logged into
Apache, not who's currently logged into the machine. And the same is
true with IIS. This is not necessarily the same as the person logged
into the machine.

Rik is correct. There is no way to get the name of the user logged into
the machine without ActiveX controls. HTTP security prohibits the
server from knowing such information - which is a good thing.

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

Nov 6 '07 #6
Jerry Stuckle pisze:
zdzisio wrote:
>Rik Wasmus pisze:

http://modntlm.sourceforge.net/


Sorry, that's a login module for Apache.
ofcourse it is.

It tells you who logged into
Apache, not who's currently logged into the machine.
I can imagine situation when this two values differ. but so what?
And the same is
true with IIS. This is not necessarily the same as the person logged
into the machine.
I can imagine situation when this two values differ. but so what?

of course you can try and log out and then log in as different user than
YOUR login to corporate network.

but question was about displaing courent user of a local machine
on web when the local machine is corporate network

to do that you have to force automatic single sign on authentication to
intranet web . what don't you understand?
Rik is correct. There is no way to get the name of the user logged into
the machine without ActiveX controls.

HTTP server sends request for NTLM authentication and Windows
workstation sends the sid back as a response. then you have to check the
sid in Active Directory (or other LDAP server ) and youre done. this is
that simple. no need to deny

HTTP security prohibits the
server from knowing such information - which is a good thing.
That's exactly the reason to use NTLM authentication not HTTP
authentication.

z.
Nov 6 '07 #7
>I can imagine situation when this two values differ. but so what?
>
>And the same is
true with IIS. This is not necessarily the same as the person logged
into the machine.

I can imagine situation when this two values differ. but so what?

of course you can try and log out and then log in as different user than
YOUR login to corporate network.

but question was about displaing courent user of a local machine
on web when the local machine is corporate network
I understood the situation to be that the local machine is *on* the
corporate network, not that it *is* the corporate network.
>to do that you have to force automatic single sign on authentication to
intranet web . what don't you understand?
>Rik is correct. There is no way to get the name of the user logged into
the machine without ActiveX controls.


HTTP server sends request for NTLM authentication and Windows
What arguments does such a NTLM request require? You haven't got
a user name at the HTTP server; that's what is desired. You
presumably don't have a password, either. The point of using the
local login is usually to avoid having to repeat that information
into a web page.

Suppose: there are several people logged in on various machines
on the local network. There are several people logged in on the
same machine as user who's making the HTTP request (possible with
terminal server or remote desktop on a Windows machine). What
information does the HTTP server have to tell which user made the
request? The IP address alone is NOT enough, and there's more than
one user logged in on that machine.
>workstation sends the sid back as a response. then you have to check the
sid in Active Directory (or other LDAP server ) and youre done. this is
that simple. no need to deny

>HTTP security prohibits the
server from knowing such information - which is a good thing.

That's exactly the reason to use NTLM authentication not HTTP
authentication.

z.

Nov 7 '07 #8
zdzisio wrote:
Jerry Stuckle pisze:
>zdzisio wrote:
>>Rik Wasmus pisze:

http://modntlm.sourceforge.net/


Sorry, that's a login module for Apache.

ofcourse it is.

>It tells you who logged into Apache, not who's currently logged into
the machine.

I can imagine situation when this two values differ. but so what?
>And the same is true with IIS. This is not necessarily the same as
the person logged into the machine.

I can imagine situation when this two values differ. but so what?
Because he specifically asked for the name of the user logged into the
client machine, not the server.

In my case, the login I use on my network is different than ANY login I
use on the internet.
of course you can try and log out and then log in as different user than
YOUR login to corporate network.

but question was about displaing courent user of a local machine
on web when the local machine is corporate network
Exactly.
to do that you have to force automatic single sign on authentication to
intranet web . what don't you understand?
No, you don't. An ActiveX control will work find for it. No login to
the server is necessary. What don't you understand?
>Rik is correct. There is no way to get the name of the user logged
into the machine without ActiveX controls.


HTTP server sends request for NTLM authentication and Windows
workstation sends the sid back as a response. then you have to check the
sid in Active Directory (or other LDAP server ) and youre done. this is
that simple. no need to deny
That is one way to do it. But it requires the server to have access to
an LDAP server. That's not always the case. And even if it did, it may
not have access to the SAME LDAP server as the client machine - as is
not at all unusual in a large corporate intranet.
>
>HTTP security prohibits the server from knowing such information -
which is a good thing.

That's exactly the reason to use NTLM authentication not HTTP
authentication.
And it isn't what he asked for.

You should learn to read what was asked for, not what you think he
should be doing. In this case they are two entirely different things.
>

z.

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

Nov 7 '07 #9
Gordon Burditt pisze:
I understood the situation to be that the local machine is *on* the
corporate network, not that it *is* the corporate network.
yes, sure, lost that word somewhere.

>
What arguments does such a NTLM request require?
to make it simple:
serwer tells the browser: you need to authenticate using NTLM , valid
user is required. then browser sends the server id of a user.
something like:
S-1-5-21-3127170830-3942366122-3349335812-41005
now it is web serwers role to do something with it.
in most corporate enviroments - use ldap call to get real name

Suppose: there are several people logged in on various machines
on the local network. There are several people logged in on the
same machine as user who's making the HTTP request (possible with
terminal server or remote desktop on a Windows machine). What
information does the HTTP server have to tell which user made the
request?
the one who owns the task running web browser. the one that
started web browser, of course

The IP address alone is NOT enough, and there's more than
one user logged in on that machine.
but obviously any program run on a workstation can check who started it.
that is the point of ActivX solution too, isn't it?
z
Nov 7 '07 #10
>What arguments does such a NTLM request require?
>
to make it simple:
serwer tells the browser: you need to authenticate using NTLM , valid
user is required. then browser sends the server id of a user.
What *browsers* do that? If a browser does that when talking over
the Internet, especially without asking for confirmation, I consider
it a serious security hole. If the user is asked to enter a valid
user name, it rather defeats the purpose of not having to log in
for the web page after you've already logged in on the workstation.

And since anything that comes from a browser is easily faked, it
seems to make pretending to be someone else fairly easy. All I
have to do is get that magic number. I think for that all I have
to do is find a file that he owns that I can look at the permissions
on, which might be easy to find on a shared volume.
>something like:
S-1-5-21-3127170830-3942366122-3349335812-41005
now it is web serwers role to do something with it.
in most corporate enviroments - use ldap call to get real name
>Suppose: there are several people logged in on various machines
on the local network. There are several people logged in on the
same machine as user who's making the HTTP request (possible with
terminal server or remote desktop on a Windows machine). What
information does the HTTP server have to tell which user made the
request?

the one who owns the task running web browser. the one that
started web browser, of course
Unless, of course, the web browser LIES.

Nov 8 '07 #11
Gordon Burditt said:
>>What arguments does such a NTLM request require?
to make it simple:
serwer tells the browser: you need to authenticate using NTLM , valid
user is required. then browser sends the server id of a user.

What *browsers* do that?
MSIE based. it is an Microsoft thing anyway. an active x applet would
work in MSIE too, i guess
If the user is asked to enter a valid
user name, it rather defeats the purpose of not having to log in
for the web page after you've already logged in on the workstation.
well , we are still taking about corporate solutions, right ?
>
And since anything that comes from a browser is easily faked, it
seems to make pretending to be someone else fairly easy.
I have a funny feeling ...
>the one who owns the task running web browser. the one that
started web browser, of course

Unless, of course, the web browser LIES.
.... that you just don't have an idea what this NTLM thing is, do you?
z.
Nov 8 '07 #12
"Gordon Burditt" <go***********@burditt.orgwrote in message
news:13*************@corp.supernews.com...
>>What arguments does such a NTLM request require?

to make it simple:
serwer tells the browser: you need to authenticate using NTLM , valid
user is required. then browser sends the server id of a user.

What *browsers* do that?
MSIE, of course.
Been that way since the 20th century.
Nov 8 '07 #13

"Sanders Kaufman" <bu***@kaufman.netwrote in message
news:eO******************@newssvr14.news.prodigy.n et...
"Gordon Burditt" <go***********@burditt.orgwrote in message
news:13*************@corp.supernews.com...
>>>What arguments does such a NTLM request require?

to make it simple:
serwer tells the browser: you need to authenticate using NTLM , valid
user is required. then browser sends the server id of a user.

What *browsers* do that?

MSIE, of course.
Been that way since the 20th century.
which was a reeeeaaaalllly long time ago, huh. :)

btw, NTLM authentication works in *any* browser. how ntlm works outside of
the client's browser is entirely a question of server configuration.
Nov 8 '07 #14
>>>What arguments does such a NTLM request require?
>>to make it simple:
serwer tells the browser: you need to authenticate using NTLM , valid
user is required. then browser sends the server id of a user.

What *browsers* do that?

MSIE based. it is an Microsoft thing anyway. an active x applet would
work in MSIE too, i guess
>If the user is asked to enter a valid
user name, it rather defeats the purpose of not having to log in
for the web page after you've already logged in on the workstation.

well , we are still taking about corporate solutions, right ?
>>
And since anything that comes from a browser is easily faked, it
seems to make pretending to be someone else fairly easy.

I have a funny feeling ...
>>the one who owns the task running web browser. the one that
started web browser, of course

Unless, of course, the web browser LIES.

... that you just don't have an idea what this NTLM thing is, do you?
Does the fact that I asked what arguments a NTLM request needs give
it away? You're right, I don't know much about it, but I have a
feeling that the people answering my questions know less about it.

A browser can't be trusted for anything involving HTTP server
security. In particular, a browser can be replaced with telnet
operated manually by someone wanting to break in to your system,
say, to find out who's on the promotion list or to get some juicy
blackmail to use against the boss. I'm sure Microsoft is not so
lame as to design an authentication system that has such a gaping
hole in it.

I have a feeling that either (a) the browser supplies a user ID and
password, which the HTTP server checks with the domain controller,
in which case the user has to log in on the web page in addition
to logging in to the local account, or (b) Windows provides some
other mechanism for the HTTP server to identify the user making the
request that doesn't involve trusting the browser.
Nov 9 '07 #15
Gordon Burditt:
>I have a funny feeling
that you just don't have an idea what this NTLM thing is, do you?

A browser can't be trusted for anything involving HTTP server
security.

the thing is - it is not about *http* security. its not a *browser*
thing. it is about windows(smb) *workstation* authenticating against
windows (smb) server. and http server being able to know that it
happened thanks to ntlm authentication module

I have a feeling that either
(b) Windows provides some
other mechanism for the HTTP server to identify the user making the
request that doesn't involve trusting the browser.
see? it involves third party - a windows server. thats why you need this
additional module for.

z.
Nov 9 '07 #16

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

Similar topics

4
by: Mikael | last post by:
Hi all, I would like to display all logged in member on my webpage. example 3 Inlogged members : adam cesar Mike ....
2
by: Dave N | last post by:
I have a combo box that displays the names of all the users in my "Users" table. I set the RowSource to a Query from the "User" and "Project" tables. I can select any name from the list and that...
2
by: Vaj | last post by:
hi, i would be very thankful if u can help me in solving this problem. my problem is i 've a page in that i'm displaying the creation dates of all files. these dates are like server dates . now...
6
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution...
4
by: Joe Van Meer | last post by:
Hi, Is the datalist meant for one table or can I use it to display information from 2 different tables? Or should I be looking at a datagrid instead? I began my code and kinda ran into a snag...
3
by: | last post by:
One thing I did a lot of in Classic ASP involved showing page elements conditionally based on whether a user was logged in or not. Logged in users or "superusers" would get more content and/or more...
1
by: Jeff | last post by:
hey asp.net 2.0 In my website I've got a textbox with TextMode=MultiLine. The user can enter text that contain "new line"... But to displays this I'm also using a textbox with...
2
by: rn5a | last post by:
The different Validation controls like RequiredFieldValidator, RangeValidator etc. have a property named Display. This property can have 3 values - Dynamic, Static & None. What's the difference...
2
by: moorcroft | last post by:
Hi, I'm developing a web application using ASP .Net and C# as code behind. On my home page Index.aspx I have login textbox's so if you correctly enter your username and password it says "You have...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.