Software & AppsOperating SystemLinux

Fixing mount.cifs in fstab after upgrading to Lubuntu 18.04

Ubuntu 17

In the process of upgrading your Lubuntu system from 16.04 to 18.04, you may encounter issues with the mount.cifs command in the fstab file. This tutorial will walk you through the steps to resolve these issues and ensure your system is functioning correctly.

Quick Answer

To fix the mount.cifs issue in fstab after upgrading to Lubuntu 18.04, you can try modifying the options in your fstab entries by adding vers=1.0 and changing passwd to password. Alternatively, you can use the credentials option to store your username and password in a separate file. Adding the domain option and experimenting with the uid and gid options may also be necessary in some cases.

Understanding the Issue

The mount.cifs utility is part of the samba suite, used to mount SMB/CIFS shares on Linux systems. After upgrading to Lubuntu 18.04, you may find that your previously working fstab entries for these shares no longer function as expected.

Diagnosing the Problem

If you’re experiencing this issue, the first step is to check your system’s error log. You can do this by running the following command in your terminal:

tail -f /var/log/kern.log

This will display the most recent entries in the kernel log, which may contain error messages related to mount.cifs.

Modifying fstab Options

One potential solution to this problem is to modify the options in your fstab entries. Specifically, you may need to add vers=1.0 and change passwd to password. Here’s an example of how your modified fstab entry might look:

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

In this entry, vers=1.0 specifies the SMB protocol version, noauto prevents the system from automatically mounting the share at startup, users allows any user to mount the share, and username and password are your credentials for accessing the share.

Using the Credentials Option

Another solution is to use the credentials option in your fstab entries. This involves creating a separate file to store your username and password, rather than including them directly in the fstab file. Here’s how you can create a credentials file:

nano /root/.smb

In this file, enter your username and password like so:

username=USERNAME
password=PASSWORD

Then, modify your fstab entry to use the credentials file:

//192.168.111.112/RAID /home/moi/share/OMV cifs vers=1.0,credentials=/root/.smb

This method has the advantage of keeping your credentials separate from the fstab file, which can be more secure.

Adding the Domain Option

In some cases, you may also need to add the domain option to your fstab entries. For example:

//192.168.111.112/RAID /home/moi/share/OMV cifs vers=1.0,credentials=/root/.smb,domain=YOURDOMAIN

In this entry, domain=YOURDOMAIN specifies the domain of your SMB/CIFS share.

Experimenting with UID and GID Options

Finally, you may need to experiment with the uid and gid options in your fstab entries. These options specify the user ID and group ID that will own the files on the mounted share, which can affect your ability to access the share.

Conclusion

Resolving issues with mount.cifs in fstab after upgrading to Lubuntu 18.04 can be a complex process, but with careful diagnosis and modification of your fstab entries, you can ensure your system is functioning correctly. Remember to consult the man mount.cifs manual page and other relevant documentation for further information.

How can I check if I am experiencing the mount.cifs issue after upgrading to Lubuntu 18.04?

You can check the system’s error log by running the command tail -f /var/log/kern.log in the terminal. This will display the most recent entries in the kernel log, which may contain error messages related to mount.cifs.

What are the potential solutions for fixing the mount.cifs issue in fstab?

There are several potential solutions. One is to modify the options in your fstab entries by adding vers=1.0 and changing passwd to password. Another solution is to use the credentials option by creating a separate file to store your username and password. Additionally, you may need to add the domain option and experiment with the uid and gid options in your fstab entries.

How do I modify the options in my fstab entries?

To modify the options, you can open the fstab file using a text editor with root privileges, such as sudo nano /etc/fstab. Then, locate the relevant entry and make the necessary changes to the options.

How do I create a credentials file?

You can create a credentials file by running the command nano /root/.smb in the terminal. This will open a text editor where you can enter your username and password. Save the file and make sure it has the correct permissions.

Should I include my username and password directly in the fstab file?

It is generally recommended to use the credentials option and store your username and password in a separate file. This helps to keep your credentials more secure, as the fstab file may be accessible to other users on the system.

How can I specify the domain of my SMB/CIFS share in the fstab entry?

You can specify the domain by adding the domain=YOURDOMAIN option to your fstab entry. Replace YOURDOMAIN with the actual domain name of your SMB/CIFS share.

Can the `uid` and `gid` options affect my ability to access the share?

Yes, the uid and gid options specify the user ID and group ID that will own the files on the mounted share. If the specified IDs do not have the necessary permissions, it may affect your ability to access the share. You may need to experiment with different values for these options to ensure proper access.

Leave a Comment

Your email address will not be published. Required fields are marked *