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

2

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

https://msdn.microsoft.com/en-us/library/windows/desktop/bb931352(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.

Mandar

Posted 2017-09-18T09:39:30.540

Reputation: 216

Answers

1

.\ 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.

music2myear

Posted 2017-09-18T09:39:30.540

Reputation: 34 957