Gene Poole
2021-Jul-17 15:58 UTC
[Samba] CIFS share disconnects on Linux client, but is still accessible via SMBCLIENT
Hello and thanks for answering. Here's the current mount line from fstab: //192.168.x.xx/Work /mnt/Work cifs noperm,_netdev,credentials=/home/alarm/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,vers=1.0 0 0 and here's smb.conf: ------------------------------------ [global] workgroup = WORKGROUP client max protocol = SMB3 netbios name = NAS server string = Our new, smaller, lighter, kinder, gentler NAS local master = yes domain master = yes preferred master = yes os level = 255 password server = None guest ok = yes guest account = nobody security = user map to guest = Bad Password large readwrite = yes socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE follow symlinks = yes wide links = yes unix extensions = no logfile = /var/log/samba/newsambalog.log log level = 3 auth:5 winbind:5 smb:5 debug timestamp = yes load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes ?----------(I've left off the configurations for the shares on the Linux box)------------ Note that the Windows host currently has both SMB1 and SMB2 enabled. I've already tried using the server name instead of the path in the mount line. Let me know if you want to see anything from the samba log as well. On 16/07/2021 16:18, Rowland Penny wrote:> On Fri, 2021-07-16 at 16:04 +0200, Gene Poole via samba wrote: >> Thanks. I added *vers=1.0 *to the mount line in fstab and it doesn't >> help. Of course I can't be sure SMB1 is actually being used. And >> isn't >> SMB1 insecure? >> >> In fact, with no "vers=" option or with "vers=2.0" or with >> "vers=1.0" >> the share mounts fine at boot. But it disappears after around 20 >> minutes. Yet it remains accessible via smbclient... >> > It might help if you posted your smb.conf and mount command. > > Rowland > > > >
Rowland Penny
2021-Jul-17 16:24 UTC
[Samba] CIFS share disconnects on Linux client, but is still accessible via SMBCLIENT
On Sat, 2021-07-17 at 17:58 +0200, Gene Poole via samba wrote:> Hello and thanks for answering. Here's the current mount line from > fstab: > > //192.168.x.xx/Work /mnt/Work cifs > noperm,_netdev,credentials=/home/alarm/.smbcredentials,iocharset=utf8 > ,gid=1000,uid=1000,file_mode=0777,dir_mode=0777,vers=1.0 > 0 0Samba 4.12.3 doesn't use SMBv1, so you should probably remove 'vers=1.0'> > and here's smb.conf:You might as well remove these, they are default settings: client max protocol = SMB3 local master = yes guest account = nobody large readwrite = yes follow symlinks = yes debug timestamp = yes You can probably remove these as well, unless you have a valid reason to keep them: domain master = yes # should be 'auto' the default preferred master = yes # should be 'auto' the default os level = 255 # why ? this isn't a BDC and a BDC shouldn't be that high password server = None # you really should remove this guest ok = yes # this should only be in a share map to guest = Bad Password # why ? if you want guest access, use 'bad user' socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE # Why ? you should rely on the kernel wide links = yes # why ?> > > > ----------(I've left off the configurations for the shares on the > Linux box)------------Pity, it might have helped to see at least one share> > Note that the Windows host currently has both SMB1 and SMB2 enabled.I suggest you disable SMBv1> I've already tried using the server name instead of the path in the > mount line.Have you tried the FQDN ? is dns set up ?> > Let me know if you want to see anything from the samba log as well.Try the suggested changes first Rowland