I have an old PC that I use as a server. It mostly is used for serving up Plex and family photos/videos - just three SATA drives attached for storage. The machine runs Ubuntu Server 22.04.2 installed on SATA A ... personal files on SATA B and C. It is not connected to a display, so I use PuTTy to manage it from my Windows 11 PCs.
Everything was working on it perfectly for a year or more, when last week I lost the ability to mount SATA A or B using the "Map Network Drive" features from my Win11 machines. I started poking around, tried to use online forums and reddit posts to self diagnose, but I'm stuck. Here's what I know.
The /etc/samba/smb.conf
file seems to be setup correctly. testparm
dumps this
user@optiserver990:~$ testparmLoad smb config files from /etc/samba/smb.confLoaded services file OK.Weak crypto is allowedServer role: ROLE_STANDALONEPress enter to see a dump of your service definitions# Global parameters[global] auto services = global bind interfaces only = Yes client max protocol = SMB3 interfaces = lo eno1 log file = /var/log/samba/log.%m logging = file map to guest = Bad User max log size = 1000 obey pam restrictions = Yes pam password change = Yes panic action = /usr/share/samba/panic-action %d passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . passwd program = /usr/bin/passwd %u server role = standalone server server string = %h server (Samba, Ubuntu) unix password sync = Yes usershare allow guests = Yes idmap config * : backend = tdb[printers] browseable = No comment = All Printers create mask = 0700 path = /var/spool/samba printable = Yes[print$] comment = Printer Drivers path = /var/lib/samba/printers[TERADRIVE] path = /media/TERADRIVE read only = No[DECATERA] path = /media/DECATERA read only = No[HOME] comment = user's home directory on Optiserver990 path = /home/user read only = No
I cannot connect to any of the defined 'TERADRIVE''DECATERA' or 'HOME' shares. When I am connected via SSH, I can use smbclient
to list shares and I get this.
user@optiserver990:~$ smbclient -L 10.0.0.5Password for [WORKGROUP\user]: Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers TERADRIVE Disk DECATERA Disk HOME Disk user's home directory on Optiserver990 IPC$ IPC IPC Service (optiserver990 server (Samba, Ubuntu))SMB1 disabled -- no workgroup available
I noticed the line SMB1 disabled -- no workgroup available, so I poked around and saw various people online say to enable SMB1 protocol on the Windows client side via "Enable Optional Features" ... that did not fix my problem. Other people said to add lines to /etc/samba/smb.conf
setting various max and min SMB protocol versions. That also did not fix my problem.
One thing I can do is I seem to be able to use smbclient
to connect to the share. Now, that is all via PuTTy'ing into the server, so maybe it's just that I'm connecting the server to itself?
Anyhow, this is what I get and I thought it at least verified that Samba is up and configured properly.
user@optiserver990:~$ smbclient \\\\10.0.0.5\\DECATERA -m SMB3Password for [WORKGROUP\user]:Try "help" to get a list of possible commands.smb: \> dir . D 0 Sun Jul 2 10:08:41 2023 .. D 0 Mon Oct 17 14:16:51 2022 SABnzbd complete D 0 Fri Dec 15 19:54:02 2023 Movies D 0 Fri Nov 17 21:46:43 2023 TV-Shows D 0 Fri Oct 6 21:00:00 2023 HelloWorld.txt A 242 Wed May 17 22:52:05 2023 lost+found D 0 Mon Oct 17 14:24:57 2022 SABnzbd incomplete D 0 Fri Dec 15 19:54:02 2023 7751273184 blocks of size 1024. 4576001592 blocks available
It also works if I leave off the -m SMB3
option, or if I pass -m SMB2
. I tried -m SMB1
and it said:
WARNING: Ignoring invalid value 'SMB1' for parameter 'client max protocol'.
When I'm connected this way, it does show up as an active connection inside of Webmin's Samba panel.
Confusingly, if I pass smbstatus --shares
I get a bunch of nothing.
user@optiserver990:~$ sudo smbstatus --shares[sudo] password for user:Service pid Machine Connected at Encryption Signing---------------------------------------------------------------------------------------------
Lastly, I tried to connect from an Ubuntu client, just to isolate the issue. It also did not work.
ubuntu@ubuntu:~$ smbclient -U user //10.0.0.5/TERADRIVEPassword for [WORKGROUP\user]:do_connect: Connection to 10.0.0.5 failed (Error NT_STATUS_IO_TIMEOUT)
Everything else is working well - I can use other machines to connect to programs like Webmin, Sabnzbd, etc. Plex is playing movies. SSH is working.
I just don’t have GUI access to mounted shares from the Windows client side.