Connecting to Samba from an Azure joined computer (AAD)

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.

Error

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.

Solution

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 * \\server\path

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

net use * \\192.168.1.61\share

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

image.png

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

Mapped drive

Did you find this article valuable?

Support Bogdan Bujdea by becoming a sponsor. Any amount is appreciated!