In this quick article, or tutorial or whatever you call it, let me share a problem solution which I recently encountered when I’m trying to connect to my client’s windows server from my Debian bases Linux system.
It’s not that this is the first time I’m trying to connect to windows server using the smbclient. Everything works before since I updated my smbclient to 4.7.4. Now if I try to connect to my windows server it shows me the following error.
Failed to retreive share list from server. No such file or directory.
I searched for the solution on different online forums and did get the breakthrough. So, the only way to solve this problem is by editing the /etc/samba/smb.conf file and override the default by adding a line inside the [global] section.
Note: If you did not find the file samba/smb.conf file in the /etc directory then you first need to install the smbclient using the following command.
sudo apt-get install smbclient -y
After the successful installation of smbclient opens the up the /etc/samba/smb.conf file and right after the
workgroup = WORKGROUP add the below line to change the default.
client max protocol = NT1
Visually the file looks like this.
In the last step, you just need to save the file and reboot the system.
Note: Reboot is necessary otherwise the above solution will not work.
Hopefully, this works well without any kind of error.
You can check out this forum for a complete discussion on why this error occurred when working with smbclient on new version “Failed to retrieve share list from the server, no such file or directory”.
If the above solution solves your problem then don’t forget to hit the ♥️ button.
Thank you for being here and keep reading…