Cannot mount NAS drive with CIFS


#1

Hi there,

I recently switched over from Arch-Anywhere/Anarchy to Manjaro and can no longer mount my NAS drive using CIFS.

My /etc/fstab has the following entry:

//NAS/Media/ /mnt/NAS/Media cifs users,uid=sypher,rw,credentials=/home/sypher/.cifs-credentials 0 0

When I run a sudo mount -a I receive the following error:

mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

When I do run modprobe cifs, I get the following error:

modprobe: FATAL: Module cifs not found in directory /lib/modules/4.14.40-1-MANJARO

Is CIFS not available in this Kernel?

Any advice would be geatly appreciated!


#2

Upstream has changed the services names. Use the forum search function. There have been many posts about problems since the recent changes to samba.


#3

Hi,

have you looked here,yet?

https://wiki.archlinux.org/index.php/samba
or

What kernel do you use?


#4

Samba units renamed

Note: In samba 4.8.0-1, the units were renamed from smbd.service and nmbd.service to smb.service and nmb.service.

To provide basic file sharing through SMB start/enable smb.service and/or nmb.service services. See the smbd(8) and nmbd(8) man pages for details, as the nmb.service service may not always be required.
Directory permissions differ

Directory permissions differ on /var/lib/samba/private/
filesystem: 755 package: 700

sudo chmod 700 /var/lib/samba/private/

See:

https://forum.manjaro.org/t/samba-problem-after-7-05-2018-update/46723


#5

This process has worked in my setup. I’m using the LTS 4.14 kernel. Automount and autodismount. Make sure cifs-utils is installed. I also install samba. Obviously, you’ll add your credentials to the generic names. :robot:

sudo mkdir -p /media/nas/yourfilename
sudo chmod 777 /media/nas/yourfilename
sudo chown yourusername:yourusername /media/nas/yourfilename
sudo systemctl enable NetworkManager-wait-online.service
sudo chmod u+s /sbin/mount.cifs
sudo nemo(or whatever file manager you use) /etc/fstab

In fstab, add…

//yournasaddress/nameofnasfilename /media/nas/nameofnasfilename cifs domain=yourdomainname,username=yourusername,password=yourpassword,x-systemd.automount,_netdev,users,uid=1000,gid=1000,rw,guest,vers=1.0 0 0 

Note* You may, or may not need the parameter “vers=1.0” in the fstab.


SABnzbd, Sonarr, and NAS
#6

That is awesome advice, but why vers=1 option in fstab.


#7

tbg,

I “think” it has something to do with the older age of the NAS drive that I use. Or something similar. I’ve tried without vers=1 and it doesn’t work.

My nas is a simple thumb drive attached directly to a router.


#8

I’ve had to use v2 before for compatibility, but I’ve never had to go back that far. The higher the version the better, so only downgrade if you have to.

ps. I’d use a credentials file instead in fstab, more secure.


#9

Good advice! Although I’m not sure the credentials file is really any more or less secure that fstab, as their both accessable - only by root. Neither is encrypted.

But, if you want to copy any of my directions above, while adding your method of using credentials…please feel free to do so.

I don’t think there can ever be enough useful data about NAS mounting in a forum.


#10

OK so all I had to do was install the ‘samba’ package.

sudo pacman -Syu samba

Thanks all for you help


#11

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.