Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Need to get Windows NT username

Need to get Windows NT username

Need to get Windows NT username

I am developing a WebDB application and I need to get the Windows NT username
of the person using this application. I have been trying to do this by using
[ServerVariables is an object which is part of the Request Object
ThisServerVariables allows the programmer to see many environment variables.
It canbe used along with IIS's directory security options to determine who is
currently accessing your site. ASP (Active Server Pages) exposes this object.
Ihave the code to do this, but it returns nothing - that's why I'm wondering
if there are any other settings involved.}
This works when I run it as an asp page. The problem arises when I try and
apply this to webdb. Do you know of any wayto make this work or any other
method by which I could retrieve the NTlogon?
I keep getting an error message saying that Request.Server is not recognised.


RE: Need to get Windows NT username

How can i download webdb2.2 on nt from the web site.

RE: Need to get Windows NT username

How are you trying to get the logon  (what sort of report / form are you using  - webdb standard report, your own sql procedure ?), where are you trying from ?

I've no experience of ASP and IIS but if you can explain your problem in a bit more depth I'll try and help if I can.


RE: Need to get Windows NT username

I got the following to work in a report; you should be able to get whatever you want using the same approach:

SELECT * from v$session WHERE username = (SELECT user FROM DUAL)

The osuser column will tell you who the user logged into their machine as.  You can also get the machine name from either the MACHINE or TERMINAL columns.  

This approach relies on two things:  
(1) You must be able to "see" the v$session view when you build your routine.
(2) Users must log onto your application.  If they are using a DAD that supplies a username/password, then all users will come in using the same username and you will potentially get many rows returned.

RE: Need to get Windows NT username

I am trying to do the same thing and I am coming in from a DAD.  Is there anyway that I can accomplish this?

Thanks for your participation.


RE: Need to get Windows NT username

Hi there

Did anyone ever come up with a solution to this?

We are using 9iAS Release 1, and I need to populate the username with the username that the user has logged onto Windows with!!

Any ideas??


RE: Need to get Windows NT username

I don't know if this will work but in vba I can see what the username is for a person who is logged into Windows NT by the following.


Hope this helps.  This doesn't work for Windows 2000 and if anyone knows how to see the person logged into Windows 2000 I would appreciate assistance.

RE: Need to get Windows NT username

Thanks sunshine19.

I have found quite a bit of help if we where using IIS.  But Oracle 9iAS comes with Apache, and so far I have not found anything except some documents on mod_ntlm which Oracle does not support!!

RE: Need to get Windows NT username

Check your IIS Settings for the web site (Properties, Directory Security, Anonymous access and authentication control).  If you are using anonymous authentication, the username will always be blank.  You will need to select an authenticated access.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close