What is difference between ".\username" vs "localhost\username" vs "MachineName\username"

I am using rdp protocol with mstsc credssp feature which helps me to delegate my credential to remote for validation.

(v=vs.85).aspx

Problem is when i am login using .\username it fails, but it goes through when localhost\username or MachineName\username is used.

Are .\username and MachineName\username treated differently.

1 Answer

.\ always authenticates the local device this is being typed on.

If you're on COMPUTER_A and you type .\username to logon, you are authenticating the account username against COMPUTER_A.

If you're on COMPUTER_A opening an RDP session to COMPUTER_B and you type .\username, you are trying to login to COMPUTER_B using an account on COMPUTER_A.

If you have already logged into COMPUTER_B via RDP and have locked the console and not just want to unlock it, all within the same RDP session, .\username will authenticate against COMPUTER_B.

COMPUTER_A\username authenticates against the device specified.

No matter where you type COMPUTER_A\username, the authentication attempt will be for the account username on the computer COMPUTER_A.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like