CLOSED: Not Able to Connect to Shared from Windows - Solution
Posted: Mon Feb 13, 2017 7:39 pm
I am a fairly new Amahi user (less than 2 months). I used to be able to connect to Amahi shares from my Windows 7 machine but one day it stopped working. The Windows machine could reach Amahi server but had authentication issues. It would pop up a window to retype the username and password. Even if I typed the workgroup in front of username or just a backslash, I still couldn't authenticate. I followed the troubleshooting page on wiki as well: https://wiki.amahi.org/index.php/Shares_troubleshooting. For me, not being able to connect to the shares defeats the whole purpose of setting up Amahi. So I had been trying to solve this problem for last couple of weeks.
Searching on internet for the solution, I noticed a lot of people had similar issues and have posted on this forum, as well as other Samba related forums. None of the solutions proposed in those forum posts helped my issue. So I did some debugging using wireshark and using samba logs (had to change log level to 5) and found the source of the problem. Even if I typed "WORKGROUP\myUserName" or "\myUserName" when prompted to provide credentials on Windows, Windows sent the computer name as the domain name. Then I decided to use commandline to connect to the shares so I could force the domain name and this finally worked. in samba logs, I could see that the correct domain name was received! So here is the command line to connect to Samba shares from windows:
Note, I didn't have to type the password as it was already set in the Windows Credential Manager.
I tried to add this info to shares troubleshooting page I mentioned above but I couldn't edit. So, I figured I will share it here. If someone could please add this info to the wiki page, it could be helpful to a lot more people.
P.S. There are other things I tried to change on Windows, in how Windows authenticates with Samba. Some forums suggested changing the Local Security Policy, bringing down the firewall etc. I wouldn't recommend doing that before you try the much safer steps above, especially, if like me, you used to be able to connect to the shares.
Searching on internet for the solution, I noticed a lot of people had similar issues and have posted on this forum, as well as other Samba related forums. None of the solutions proposed in those forum posts helped my issue. So I did some debugging using wireshark and using samba logs (had to change log level to 5) and found the source of the problem. Even if I typed "WORKGROUP\myUserName" or "\myUserName" when prompted to provide credentials on Windows, Windows sent the computer name as the domain name. Then I decided to use commandline to connect to the shares so I could force the domain name and this finally worked. in samba logs, I could see that the correct domain name was received! So here is the command line to connect to Samba shares from windows:
Code: Select all
net use U: \\hda\Movies /USER:WORKGROUP\myUserName /PERSISTENT:YES
Note, I didn't have to type the password as it was already set in the Windows Credential Manager.
I tried to add this info to shares troubleshooting page I mentioned above but I couldn't edit. So, I figured I will share it here. If someone could please add this info to the wiki page, it could be helpful to a lot more people.
P.S. There are other things I tried to change on Windows, in how Windows authenticates with Samba. Some forums suggested changing the Local Security Policy, bringing down the firewall etc. I wouldn't recommend doing that before you try the much safer steps above, especially, if like me, you used to be able to connect to the shares.