Specify SMB 3.0 in /etc/fstab

73,864

I had the same problem which was also due to an upgrade to one of my institute’s servers. I managed to mount the share by adding the vers=3.0 option to fstab without the -o argument.

sudo mount -t cifs //192.168.1.100/Movies /mnt/Media vers=3.0,user=plex,uid=111,gid=1000,pass=PASSWORD
Share:
73,864

Related videos on Youtube

synthetiq
Author by

synthetiq

Updated on September 18, 2022

Comments

  • synthetiq
    synthetiq over 1 year

    TL;DR: What is the syntax to mount a CIFS share via SMB3 in /etc/fstab?

    Previously, I had this working in my /etc/fstab:

    //192.168.1.100/Movies /mnt/Media cifs credentials=/home/syn/.smbcred,uid=111,gid=1000,iocharset=utf8 0 0
    

    But after some bug with the server, I now need to specify the SMB version when mounting. I am able to do this via mount:

    sudo mount -t cifs //192.168.1.100/Movies /mnt/Media -o vers=3.0,user=plex,uid=111,gid=1000,pass=PASSWORD
    

    But I cannot seem to specify the version in fstab and get it to work. Any ideas?

    Similar thread here, but unanswered.

    • Admin
      Admin almost 7 years
      See the samba config file:samba.org/samba/docs/man/manpages-3/smb.conf.5.html SMB3 is the default by the way unless you specify otherwise and it will use a lower version when the client asks for it.
    • Admin
      Admin over 5 years
      If you mount shares from a modern version of Windows, do not use vers=1.0. This version of SMB protocol is deprecated, unefficient and gives you a very bad performance. Use vers=3.0 as minimum and if doesn’t work, specify sec=ntlmv2 It’s another common issue that some people use sec=ntlm instead of sec=ntlmv2. Ntlmv1 is an insecure authentication method and it’s disabled by security updates on Windows or Windows Server which hosts the share. So you probably get a permission/authentication related error when try to mount the share with sec=ntlm Cheers
  • synthetiq
    synthetiq over 6 years
    While this post was a while ago and I had figured out the syntax, I forgot to update the post. Thank you, kmdouglass, for posting. Here is my working syntax for mounting a CIFS 3 hosted on FreeNAS to Ubuntu: //192.168.1.1/Media /mnt/Media cifs credentials=/home/me/.smbcred,uid=100,gid=1000,vers=3.0,ioch‌​arset=utf8 0 0 Edit based on your local environment. -o is not needed in /etc/fstab
  • lemonskunnk
    lemonskunnk over 2 years
    little sad this has been viewed 68,000 times and you've only gotten 15 ^. Anyway, thanks for the concise answer! exactly what i needed after upgrading kernal to 5.15 on centos 7.