Tuesday, May 21, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 8027  / 3 Years ago, sun, october 17, 2021, 5:20:04

I just upgraded my file server from 16.04 to 20.04 and everything seems to be working except for my SMB mounts on my Ubuntu computer.
I can access the SMB shares on my Windows computer but on my Ubuntu 18.04 computer I can't get the shares mounted in fstab.


If I mount the shares from the command line (command below) it is mounted just fine.


sudo mount -t cifs -o username=username,vers=3.0 //192.168.1.116/Share /mnt/Share/

However when I try to mount the share in fstab (command below) the smb share is not mounted.


//192.168.1.116/Share  /mnt/Share  cifs  credentials=/home/user/.smbcredentials,vers=3.0,iocharset=utf8,sec=ntlmssp  0  0

After doing a sudo mount -a and trying a ls I get:



ls: cannot access 'Share': Operation not supported



and when I do a smbclient -L //192.168.1.116 I get:



protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE



Update:


When I do a


sudo mount -t cifs -o credentials=/home/user/.smbcredentials,vers=3.0,iocharset=utf8,sec=ntlmssp //192.168.1.116/Share /mnt/Share/

The SMB share is mounted properly.


When I do a


smbclient -L //192.168.1.116 -d 0

I get the same result:



protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE.



dmesg -t | grep -e CIFS returns:



CIFS VFS: cifs_mount failed w/return code = -95



When I check dmesg with the debug turned on I get a lot of:



/build/linux-Dh1oQA/linux-4.4.0/fs/cifs/cifsfs.c: CIFS VFS: in
cifs_statfs as Xid: 9405245 with uid: 1000




/build/linux-Dh1oQA/linux-4.4.0/fs/cifs/cifsfs.c: CIFS VFS: leaving
cifs_statfs (xid = 9405245) rc = -95




/build/linux-Dh1oQA/linux-4.4.0/fs/cifs/inode.c: CIFS VFS: in
cifs_revalidate_dentry_attr as Xid: 9405247 with uid: 1000




/build/linux-Dh1oQA/linux-4.4.0/fs/cifs/inode.c: CIFS VFS: leaving
cifs_revalidate_dentry_attr (xid = 9405247) rc = -95



More From » mount

 Answers
1

Not sure what happened but I was able to get this issue resolved.


I decided I'd start over and did a sudo umount /mnt/Share(s). After unmounting each directory I was about to use sudo mount -a and have my mount points in fstab all mount properly.


The clue was in an answer that is no longer available. The answer author (iirc @heynnema) asked me to put file_mode=0777,dir_mode=0777 in my fstab for a mount.


Fresh eyes this morning noticed that the directory was highlighted. A quick ls -l showed me it was 777 which wasn't right.
I wasn't able to change it by adjusting fstab so I figured I'd start fresh again. Seems it worked this time around.


In the end I added to my;


smb.conf file


min client protocol = NT1
max client protocol = SMB3

/etc/fstab


vers=3.0

Even with min client protocol = NT1. The vers=3.0 was required.


[#768] Monday, October 18, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
azaaburge

Total Points: 266
Total Questions: 85
Total Answers: 109

Location: Djibouti
Member since Sat, Oct 29, 2022
2 Years ago
azaaburge questions
Thu, Jun 2, 22, 23:28, 2 Years ago
Fri, Jun 25, 21, 16:22, 3 Years ago
Thu, Feb 24, 22, 03:51, 2 Years ago
;