Link to home
Start Free TrialLog in
Avatar of cjb061398
cjb061398

asked on

Changing REMOTE_USER with a CGI rather than closing the browser

If I've already authenticated at a website with a username:password pair, how do I write a CGI that, when invoked, will reset the value of $REMOTE_USER, and challenge me again for my username:password pair. I want to be able to log in as a different user at this point.

I know I can close my browser and $REMOTE_USER will reset, but I'd like to avoid that pain.
ASKER CERTIFIED SOLUTION
Avatar of julio011597
julio011597

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alamo
alamo

In many cases a better way might be "http://cjb@my.host.com" instead, leaving out the password. The dialog will pop up and ask you.

The advantage of this is that this way your password won't be included in your browser history or any bookmarks you make. I am not sure if your password shows up in the REFERER field also, when you click on an external link, it might, I've never checked.

Yes, right. About REFERER, i'm not sure either, but shouldn't be the case... anyway, to be tried.

cjb, still around?

-julio
I just checked, name:pw@ does indeed show up in the REFERER. I tested with Netscape 4.04. So be careful...