Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I get the user name from the system for authentication?

Status
Not open for further replies.

tbrowne

IS-IT--Management
Joined
Dec 27, 2001
Messages
51
Location
US
I need to get the system user name for authentication purposes to use in a php script. This would be similar to using "NT Authentication" for MS SQL Server or other application. Can this be done with php?
 
Sorry for the confusion. I'd like to retrieve the username of the person logged into a networked PC running Windows NT. I'd like to use the NT username to cross reference authority to MySQL database queries.

There is a Windows API that will return the username, but I don't think its available from a browser.
 
I'm pretty sure this information is available through the browser... but I'm also pretty certain there are some catches... like requiring IIS as the webserver.

I wish I remembered more details because I know I've read about this before, but I'm drawing a blank... if I remember anything I'll update.

-Rob
 
skiflyer:
The only place I know of that PHP has available to it the authentication credentials offered by a user through a web browser is in $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW]'. But those are only available if you're authenticating through Apache using basic authentication and if PHP is running as an Apache module.


tbrowne:
Get very specific here. You are running PHP how -- as a web app engine, or as a standalone scripting language? What is your user interfact -- browser, DOS prompt, shell terminal? What is your run environment?


Want the best answers? Ask the best questions: TANSTAAFL!!
 
Here's the layout. The server in a Linux box , RedHat 8, running Apache Server. The Clients are all Windows 2000 Professional desktops accessing the files with Internet Explorer v6.0. This is an intranet site that is updated daily. One of the most used features on this site is to allow users to open a form, fill in necessary information and submit the form with a minimal amount of text entry. I would like to be able to grab the user's NT login username and send that username back to the server with the form contents. Doing this, eliminates the need for the user to provide a name or employee number on the form and provides authentication as to who the user is.

We use these forms for vacation requests, training requests, repair requests and a number of other uses. I might add that we have been using this application for several years on a Windows NT server running FrontPage server extensions. Obtaining the NT login name with FrontPage is easy to do. I'm in the process of rewriting this web application for the Apache server without the FrontPage extensions. We are trying to convert as many applications as possible to run purely in the Linux environment, mostly for the cost savings available with open source products.

Thanks for the help so far!
 
Here's the layout. The server is a Linux box, RedHat 8, running Apache Server. The Clients are all Windows 2000 Professional desktops accessing the files with Internet Explorer v6.0. This is an intranet site that is updated daily. One of the most used features on this site is to allow users to open a form, fill in necessary information and submit the form with a minimal amount of text entry. I would like to be able to grab the user's NT login username and send that username back to the server with the form contents. Doing this, eliminates the need for the user to provide a name or employee number on the form and provides authentication as to who the user is.

We use these forms for vacation requests, training requests, repair requests and a number of other uses. I might add that we have been using this application for several years on a Windows NT server running FrontPage server extensions. Obtaining the NT login name with FrontPage is easy to do. I'm in the process of rewriting this web application for the Apache server without the FrontPage extensions. We are trying to convert as many applications as possible to run purely in the Linux environment, mostly for the cost savings available with open source products.

Thanks for the help so far!
 
PHP won't do it -- PHP is server side. Client-side JavaScript won't do it -- JavaScript is sandboxed.

You might be able to do it through the use of client-side VBScript programming on pages of the intranet.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top