Link to home
Start Free TrialLog in
Avatar of free2get
free2get

asked on

Losing cached credentials in XP

When logging into a folder on a remote server (Win 2003), how can I prevent XP from remembering the credentials so I can log on as another user to that folder seconds/minutes later? Currently I have been loging off and back into XP, but this is a bit tedious, I'm sure there is a better way!

Steve
Avatar of Rich Rumble
Rich Rumble
Flag of United States of America image

There isn't better way, it's a core function of windows Authentication, the tokens you are granted do not expire until you have logged off the PC that is storing them.  These tokens are stored in memory. You may be able to use the "net use" cmd to negoitiate a new token crediential as eluded to in this M$ article: http://support.microsoft.com/default.aspx?scid=kb;EN-US;122422
Also in windows2003 this becomes an easy task for you: http://www.develop.com/kbrown/book/html/howto_logonuser.html
Net Use example that may accomplish your goal... I am not sure if you have 2 token's established to one folder, which one windows will use to permit you access.
net use p: \\<machine>\other_folder /user:free2get
GL!
-rich
Avatar of billwharton
billwharton

Well, there isin't a registry key for doing that from the research I have done in the past. What you can do though is this:

Whenever you access a shared folder on another computer, this shows up in network maps.

Right click on 'my network places' on the desktop and choose 'disconnect network drive' and then disconnect the share you see in there. This way, it disconnects the netbios connection to the particular server. Wait a couple of seconds and try again and it should ask you for logon credentials this time.
Avatar of free2get

ASKER

I wasn't wanting to map the drive, so I'm not looking for a net use solution. The folder I'm accessing on the server isn't shared either, the user just has NT permissions to access via "\\servername\resource". The secondary user credentials I was wanting to log on with was to test NT security permissions to this folder. I guess I'll just have to accept that I can't circumvent the token system! Thanks for your imput though....was just trying to beat a small frustration I encountered when testing.

Steve
I know you aren't mapping the drive. Try the solution I talked about.

Even though you aren't actually mapping a drive but only access it by doing \\servername\share, it stil shows up there and can be disconnected!
In 2003 you can though... the link I provided had a perl script that would do as you were asking... from the article: It returns a token that references the new logon session, and you can use this token to impersonate the user.
again, that article http://www.develop.com/kbrown/book/html/howto_logonuser.html his other links will help also http://www.develop.com/kbrown/book/html/whatis_protocoltransition.html

Also, net use  isn't to just "map" a drive, it will in fact add another token to your system. You can browse to that drive with the Mapped netuse drive, or by explorer. However I am not certain what token will be used when accessing that folder...
GL!
-rich
ASKER CERTIFIED SOLUTION
Avatar of Rich Rumble
Rich Rumble
Flag of United States of America image

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
Sorry Rich, I should have awareded you these points much earlier! I'm tidying up my questions and realised it was still open. Although the other solutions were adequate yours has been the one I have been using ever since. As I said at the outset I was looking for something flexible and least tedious. It's simple and it works.

Steve