
In this article, we will explore how to fix the “CIFS mount in FSTAB does not work after update” error in Ubuntu. This issue typically arises after an update and results in an “Invalid argument” error. We’ll walk through the steps to resolve this issue, explain the commands used, and provide context for better understanding.
To fix the "CIFS mount in FSTAB does not work after update" error in Ubuntu, you can try adding the vers=1.0
option or changing the sec=ntlm
option to sec=ntlmssp
in the fstab file. It is also recommended to check the SMB protocol version being used by the server and the authentication settings. In some cases, removing the sec=ntlm
option from fstab may resolve the issue. Remember to backup your fstab file before making any changes.
Understanding the Issue
The shares are usually mounted using the following line in the fstab (File System Table):
//IP-of-server/samba-directory /Path-to-mount-point/ cifs users,noauto,uid=1000,gid=1000,credentials=/path-to-credentials,iocharset=utf8,sec=ntlm 0 0
The mount -a
command, which is used to mount all filesystems mentioned in fstab, does not show any errors. However, accessing the share directly through the File-Explorer is successful. The tail -f /var/log/kern.log
command, which displays the end of the kernel log file, shows the error message “CIFS VFS: Unable to select appropriate authentication method!”.
Possible Solutions
Adding the vers=1.0
option
One possible solution is to add the vers=1.0
option to the mount options in fstab. This option specifies the SMB protocol version. The modified line in fstab would be:
//IP-of-server/samba-directory /Path-to-mount-point/ cifs users,noauto,uid=1000,gid=1000,credentials=/path-to-credentials,iocharset=utf8,sec=ntlm,vers=1.0 0 0
Changing the sec=ntlm
option to sec=ntlmssp
Another solution is to change the sec=ntlm
option to sec=ntlmssp
in fstab. This option specifies the security mode. The modified line in fstab would be:
//IP-of-server/samba-directory /Path-to-mount-point/ cifs users,noauto,uid=1000,gid=1000,credentials=/path-to-credentials,iocharset=utf8,sec=ntlmssp 0 0
Checking the SMB protocol version
It is suggested to check the SMB protocol version being used by the server. Ensure that the server is set to use SMB2 or higher. This can be done by checking the server configuration.
Checking the authentication settings
It may also be helpful to check the authentication settings on the server, such as ntlm auth
and client ntlmv2 auth
. These settings can be checked in the server configuration.
Removing the sec=ntlm
option
In one case, removing the sec=ntlm
option from fstab resolved the issue. The modified line in fstab would be:
//IP-of-server/samba-directory /Path-to-mount-point/ cifs users,noauto,uid=1000,gid=1000,credentials=/path-to-credentials,iocharset=utf8 0 0
Conclusion
It is important to note that the default behavior of the mount.cifs
command may have changed after the update, which could explain the need for modifying the mount options. By following the solutions outlined in this article, you should be able to resolve the “CIFS mount in FSTAB does not work after update” error in Ubuntu.
Remember, it’s always a good idea to backup your fstab file before making any changes. If you have any questions or need further assistance, feel free to reach out to the Ubuntu community.
In Ubuntu, fstab (File System Table) is a configuration file that lists the filesystems to be mounted at boot time. It contains information about the devices and their mount points, as well as the options for mounting them.
You can access fstab in Ubuntu by opening a terminal and typing sudo nano /etc/fstab
. This will open the fstab file in the nano text editor with root privileges, allowing you to make changes to it.
The "Invalid argument" error in Ubuntu typically indicates that there is a problem with the arguments or options provided in a command or configuration file. In the case of the "CIFS mount in FSTAB does not work after update" error, it suggests that there is an issue with the mount options specified in the fstab file.
To check the SMB protocol version being used by the server, you can use the smbclient
command. Open a terminal and type smbclient -L IP-of-server -U username
, replacing "IP-of-server" with the actual IP address of the server and "username" with a valid username on the server. This command will display information about the server, including the supported SMB protocol versions.
To backup your fstab file before making changes, you can use the cp
command. Open a terminal and type sudo cp /etc/fstab /etc/fstab.bak
. This command will create a backup of the fstab file with the ".bak" extension in the same directory.
If something goes wrong after making changes to fstab, you can revert to the original file by using the backup file created earlier. Open a terminal and type sudo cp /etc/fstab.bak /etc/fstab
. This command will overwrite the modified fstab file with the backup file, effectively reverting the changes.