Results 1 to 6 of 6

Thread: fstab cifs differences 16.04 vs 18.04??

  1. #1
    Join Date
    Nov 2017
    Beans
    12

    fstab cifs differences 16.04 vs 18.04??

    I have a existing 16.04 VM with the line below in /etc/fstab and it is working. Same exact line in 18.04 results in the error below. What is wrong here, I thought this would be easy to copy?

    Code:
    //192.168.100.123/freenas /mnt/freenas cifs credentials=/home/myuser/freenaspasswords,vers=3.0,iocharset=utf8,sec=ntlm,uid=myuser 0 0
    Code:
    mount error(22): Invalid argument
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    /mnt/freena exists and the password file exists with same contents and permissions as on the other server. So switching things up a little I try this;

    Code:
    //192.168.100.123/freenas /mnt/freenas cifs username=username,password=password,iocharset=utf8,sec=ntlm 0 0
    Same error. I originally used this page to put the commands together on the first server, which worked.
    https://wiki.ubuntu.com/MountWindowsSharesPermanently

    I can see the old server is cifs version (2:6.4-1ubuntu1.1) and the new one is version (2:6.8-1). I used "sudo apt-get install cifs-utils" to get cifs on the new server.

  2. #2
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: fstab cifs differences 16.04 vs 18.04??

    Last week, I had to removed iocharset=utf8 option on my 16.04 cifs connections into Win7 machines to get any shares to work. Win7 supports vers=2.1 only. Also, sec=ntlmv2 is working.

    From the mount.cifs manpage:
    Code:
    The default in mainline kernel versions prior to v3.8 was sec=ntlm.
               In v3.8, the default was changed to sec=ntlmssp.
    Credentials files are still working.

    Don't know if any of this is helpful or not.
    Last edited by deadflowr; December 1st, 2019 at 05:45 AM. Reason: fixed cpde tags

  3. #3
    Join Date
    Nov 2017
    Beans
    12

    Re: fstab cifs differences 16.04 vs 18.04??

    The part that is confusing me is this is the same NAS device I'm getting in to with two different Ubuntu versions with the same command. One works and the other doesn't. I could totally understand if the NAS changed something in an update that drove a need for client side changes. None of my windows boxes have problems getting into it either.

  4. #4
    Join Date
    Dec 2009
    Beans
    6,816

    Re: fstab cifs differences 16.04 vs 18.04??

    sec=ntlm is inconsistent with vers=3.0. If I add sec=ntlm to an already working cifs mount expressions of a modern server I too will get the Invalid Argument error.

    vers=1.0,sec=ntlm makes sense. vers=3.0,sec=ntlm dos not.

    The version of the Linux Kernel that comes with 18.04 is designed to negotiate with the sever the best smb dialect ( i.e., vers ) to use from vers=2.1 to vers=3.0 automatically.

  5. #5
    Join Date
    Nov 2017
    Beans
    12

    Re: fstab cifs differences 16.04 vs 18.04??

    Quote Originally Posted by Morbius1 View Post
    sec=ntlm is inconsistent with vers=3.0. If I add sec=ntlm to an already working cifs mount expressions of a modern server I too will get the Invalid Argument error.

    vers=1.0,sec=ntlm makes sense. vers=3.0,sec=ntlm dos not.

    The version of the Linux Kernel that comes with 18.04 is designed to negotiate with the sever the best smb dialect ( i.e., vers ) to use from vers=2.1 to vers=3.0 automatically.
    Ah! Newer version seems much smarter, I was able to get rid of the explicit switches and it worked;

    Code:
    //192.168.100.123/freenas /mnt/freenas cifs credentials=/home/myuser/freenaspasswords,iocharset=utf8,uid=myuser 0 0
    I remember lots of trouble getting it to work under 16.04 so that's why I wound up with that combo.

  6. #6
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: fstab cifs differences 16.04 vs 18.04??

    Quote Originally Posted by maxburn View Post
    I remember lots of trouble getting it to work under 16.04 so that's why I wound up with that combo.
    The SMB combinations are many. Clients, servers, minimal servers, old servers, new servers .... and clients from any vendor or F/LOSS project out there. At some point it will "just work", hopefully.

    Or with FreeNAS and any Unix-based system, just use NFS. Basically, NFS "just works" and has little overhead for clients. For video streaming, NFS is recommended by OSMC and Kodi teams.

    If this thread is solved, please use the Thread Tools button near the top to mark it that way. Greatly helps out the community, both people seeking answers and those wanting to help.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •