My fstab for connecting to a local NAS was always

// /home/moi/share/OMV cifs noauto,users,username=USERNAME,passwd=PASSWORD

After upgrading my system from Lubuntu 16.04 to 18.04 this did not work any more, giving the error-message:

Failed to query password: Permission denied
Password for USER@// mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

What worked for me was adding vers=1.0 to the options in fstab in combination with changing the option for password from passwd to password:

// /home/moi/share/OMV cifs  vers=1.0,noauto,users,username=USERNAME,password=PASSWORD

This helped to find an error-log:

tail -f  /var/log/kern.log 

I would appreciate any further input.


Ben has given the answer:

What worked for me was adding vers=1.0 to the options in fstab

When you try to do a mount.cifs using a SMB1 resource, you get this sort of messages in the kernel log:

$ journalctl | grep CIFS

Sep 04 14:57:22 nfsbonos kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
Sep 04 14:57:23 nfsbonos kernel: CIFS VFS: cifs_mount failed w/return code = -112

So trying the mount.cifs using the option vers=1.0 should fix it:

$ mount.cifs /\/\$IP_of_RESOURCE_CIFS/\folder /mnt/folder -o vers=1.0,credentials=/root/.smbcredentials

and in fstab, just putting at the beginning of the options "vers=1.0," (after cifs).

Many, many thanx, Ben.


I have been struggling with this for a couple days, I could get to samba shares on an ubuntu 16.04 desktop system with my lubuntu 18.04 new installation using smb4k, but not in fstab. I used some of the parameters listed by 'mount' after mounting a share using smb4k. What I found was the credentials=/etc/samba/auth.myserver.me did not work like it did with ubuntu 16.04. The following syntax would allow a mount:

//     /mnt/localdir       cifs  rw,vers=1.0,sec=ntlmssp,username=USER,password=PASSWORD,domain=YOURDOMAIN,uid=LOCALUSER,gid=LOCALUSER,posixpaths,mapposix,acl     0   0

What I do not know is which of the above options are required. Use your own values for USER, PASSWORD, and YOURDOMAIN.

Whenever I used the credentials=/etc/samba/auth.myserver.me, I would always get a 'Permission denied' message. Apparently ubuntu 18.04 is not properly accessing the credentials file listed in fstab or the syntax has changed.

You may have to experiment with the uid and gid. I normally only login as a particular user, which I am calling LOCALUSER, the default group for that login would also be LOCALUSER.

  • I had the same issue and none of the other solutions (such as "vers=1.0") worked for me. Finally I could mount our shares just adding the domain= option (even using the credentials file as before...). – bitifet Jan 8 at 9:16

My tried and true fstab entry to mount a USB drive attached to a TP-Link router stopped working after a Ubuntu/Mint update. Adding vers=1.0 fixed it. My fstab entry is exactly as below:

// /home/don/RemoteMedia/NAS_USB cifs vers=1.0,guest,uid=1000 0 0

volume9 and its location is the disk partition as identified by the router admin webpage. Remote Media is a folder I created in my home directory "don". Be sure to change permissions of this directory so the logged on user can access without root privileges. NAS_USB is just a name I picked which will appear in my Remote Media folder once mounted containing the "linked" contents of volume9. Other answers I found had passwords etc in the example. This USB drive appears as a simple windows share and this is a simple fstab to support mounting the disk automatically at startup so that an automated backup to the network drive is possible.

I hope that this helps.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.