- 1 year ago
Windows share smb connection hangs on Ubuntu 20.04
If you are experiencing issues with SMB connections hanging on Ubuntu 20.04 when connecting to a Windows share, there are a few steps you can take to troubleshoot and resolve the problem:
Ensure SMB/CIFS packages are installed: Make sure that the necessary SMB/CIFS packages are installed on your Ubuntu system. You can install them by running the following command:
arduinosudo apt-get install cifs-utils
Check network connectivity: Verify that there is proper network connectivity between your Ubuntu machine and the Windows share. Ensure that you can ping the Windows machine and that there are no firewall rules or network configurations blocking the SMB traffic.
Specify SMB version: Try specifying the SMB version explicitly when mounting the share. By default, Ubuntu 20.04 uses SMB version 3.0, but you can specify a lower version if needed. For example:
bashsudo mount -t cifs //windows-server/share /mnt/mount-point -o vers=2.0,username=<username>,password=<password>
Enable SMB 1.0 support (if applicable): If the Windows share requires SMB 1.0 support, you may need to enable it on your Ubuntu system. However, it's generally recommended to use a more secure SMB version whenever possible.
To enable SMB 1.0 support, install the
smbclient
package:arduinosudo apt-get install smbclient
Then, edit the
/etc/samba/smb.conf
file and add the following lines:python[global]
client min protocol = NT1
client max protocol = NT1
Save the file and restart the Samba service:
sudo service smbd restart
Please note that enabling SMB 1.0 is not recommended due to security vulnerabilities associated with that protocol version. It should only be used as a temporary solution if there are compatibility constraints.
Verify credentials and permissions: Ensure that the credentials used to connect to the Windows share are correct and that the specified user has appropriate permissions to access the shared resources.
Check for error messages: If the connection hangs, check the system logs (
/var/log/syslog
or/var/log/messages
) for any error messages related to the SMB connection. This can provide further insight into the underlying issue.
By following these steps, you should be able to troubleshoot and resolve SMB connection issues between Ubuntu 20.04 and Windows shares.