Ubuntu 17.10 issue with mount cifs

21,872

Solution 1

I had the same problem after upgrading to Ubuntu 17.10. Suddenly, my CIFS shares would no longer mount. Adding vers=1.0 to the mount options fixed it for me. Admittedly, this is a bit of a bodge, but some network share access is better than no network share access.

My /etc/fstab file previously had the following 4 lines at the bottom:

# Network File Shares
//phc.imsu.ox.ac.uk/phc     /mnt/PHC        cifs    credentials=/home/benjamin/.smbcredentials,iocharset=utf8,sec=ntlm,dir_mode=0777,file_mode=0777 0   0
//phc.imsu.ox.ac.uk/departments /mnt/DEPARTMENTS    cifs    credentials=/home/benjamin/.smbcredentials,iocharset=utf8,sec=ntlm,dir_mode=0777,file_mode=0777 0   0
//femur.imsu.ox.ac.uk/phc_cprd  /mnt/PHC_CPRD       cifs    credentials=/home/benjamin/.smbcredentials,iocharset=utf8,sec=ntlm,dir_mode=0777,file_mode=0777 0   0

Changing them to:

# Network File Shares
//phc.imsu.ox.ac.uk/phc     /mnt/PHC        cifs    credentials=/home/benjamin/.smbcredentials,iocharset=utf8,sec=ntlm,dir_mode=0777,file_mode=0777,vers=1.0    0   0
//phc.imsu.ox.ac.uk/departments /mnt/DEPARTMENTS    cifs    credentials=/home/benjamin/.smbcredentials,iocharset=utf8,sec=ntlm,dir_mode=0777,file_mode=0777,vers=1.0    0   0
//femur.imsu.ox.ac.uk/phc_cprd  /mnt/PHC_CPRD       cifs    credentials=/home/benjamin/.smbcredentials,iocharset=utf8,sec=ntlm,dir_mode=0777,file_mode=0777,vers=1.0    0   0

Resolved the issue.

Solution 2

Try this:

mount -t cifs -o vers=1.0,username=t0b1,password=$pw //server.local/shared/ /media/shared

That is, the same as your first try but without space. They are not allowed in the options. That is probably the reason why the mount does not see username ans password.

Share:
21,872

Related videos on Youtube

t0b1
Author by

t0b1

Updated on September 18, 2022

Comments

  • t0b1
    t0b1 over 1 year

    since the update to Ubuntu 17.10 my script to mount shares from a NAS does not work anymore. On older versions of Ubuntu I could use this line:

    mount -t cifs -o username=t0b1,password=$pw //server.local/shared/ /media/shared
    

    Adding another option to specify the version does not seem to change anything:

    mount -t cifs -o vers=1.0, username=t0b1,password=$pw //server.local/shared/ /media/shared
    

    When I run the script on Ubuntu 17.10 the only output I get is a list of options for "mount" but it does not mount my shares. Does anyone know what exactly has changed with cifs on 17.10? Any idea what I could change here?

    EDIT: This line actually works:

    mount -t cifs -o  username=t0b1,password=$pw,vers=1.0 //server.local/shared/ /media/shared
    

    But I think using version 1.0 is only a temporary workaround because it has some known security issues. There should also be a way to get it running with version 3.

  • t0b1
    t0b1 over 6 years
    This line works but i will leave the question open. Maybe someone can come up with a solution without this workaround to use the older version.
  • Andrew Barker
    Andrew Barker over 6 years
    Just to add that with similar scenario but using autofs was also solved by adding 'vers=1.0' to the existing line in auto.nfs :- USB2 -fstype=cifs,rw,bg,intr,noperm,vers=1.0,user=,password= ://192.168.1.172/USB2
  • Sridhar Sarnobat
    Sridhar Sarnobat almost 6 years
    worked for me too on Ubuntu 16.04.4 (Ubuntu 16.04.1 did not need it) I lost the last hour of my life beacuse of this.