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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting windows account logon details 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

We have an admin section of our website shielded behind SSL and uses Windows Authentication to gain access to the web area.

Usually only staff use this section so there is a one userid/pword for access.

Now I've been asked to set up additional logins for 3rd parties and so I need to be able to create additional logins for the folder path in IIS, but then only display certain areas / menus based on who just logged in.

How do I gain the info on UserID used to login via perl once the browser loads the default page after windows has authenticated login.

hope that makes sense.

Cheers,
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
print out the %ENV hash. Normal there will be a $ENV{'REMOTE_USER'} variable that will tell you the login/pass of who is logged in. Not sure with windows authentication but if it isn't in %ENV I wouldn't know how to find it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Spot on Travis, many thanks!

It returned 'ServerName/UserID' , easy to split out and work with!

Regards,

1DMF



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top