Tuesday, January 25, 2022

Connecting to Samba from an Azure joined computer (AAD)

Must read

Bogdan Bujdeahttps://thewindev.net/
I'm a passionate/professional/Test Driven developer.

If you’re trying to connect to Samba share from a computer that is joined to Azure Active Directory, then you might encounter this error:

A specified logon sessions does not exist. It may already have been terminated.


On my personal laptop I can do this and it works just fine, but on my work laptop I get the error above. I assume it has something to do with the fact that my work laptop uses Windows 10 Enterprise and/or it is an Azure joined device.

Even though I’m not sure what’s wrong, here’s a solution that works:

  1. Open Powershell/CMD and type this command:
net use * serverpath

Replace serverpath with the address of your server and the path that you want to map. In my case, I want to connect to and map the path share, so the command looks like this:

net use *

  1. A prompt will appear asking you for the username and password. Fill those in and hit Enter after each one.


Once you fill those in, the new drive will be mapped and you can access it from Explorer.

Mapped drive

More articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest articles