Linux help with connecting to NAS

I recently got a new NAS

New NAS

Thing’s are up and running, but in linux the fstab commands I used before aren’t working.

//ip-address/public     /home/user/Network/network cifs        credentials=/home/user/.smbpassword,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Getting “mount.cifs:permission denied” error with command

sudo mount -a

What do I need to change in the NAS settings to allow me to mount the NAS onto a linux system using fstab?

thanks

Did you confirm the content of /home/user/.smbpassword by testing a mount manually?

e.g.

sudo mount -t cifs //ip-address/public     /home/user/Network/network -o credentials=/home/user/.smbpassword,iocharset=utf8,file_mode=0777,dir_mode=0777

maybe once without the credentials option specifying username/password explicitly. A successful login could confirm correct credentials pointing to an incorrect .smbpassword file. Or expose incorrect credentials. Or …

1 Like

I recently setup some readonly guest SMB mounts and had to pass ro,guest,sec=none,soft,vers=3.1.1

… it didn’t work before I passed the vers parameter.

You can also try logging in and browsing a share with the smbclient on the command line.

You’ll also need to let through incoming TCP port 445 for SMB/Samba to work if you have a firewall on your NAS.

^this. linux will default to legacy smb protocols and the NAS may be blocking versions older than 3 (truenas does).

you can also hard code your username and password into fstab to test with user=foo,password=bar,uid=1001,guid=1001

thanks for the manual command, but I simply didn’t point to right directory on NAS, everything is good now.

My bad

Let us know what your performance is like. I get terrible performance over SMB with my Synology. Seems like the SMBv3 support is broken with them. AFP is a bit better tho.

Maybe tangential but… why are you mounting the share as an SMB share when you’re on Linux anyway? That seems a bit wasted on both ends since you have an SMB overhead on both sides and SMB isn’t all that stellar in the first place.

Why not just NFS when the NAS is Linux based anyway like the Asustor?

Because I don’t know or know how.

If you have a better method you can list the commands so I can see if the method works good for me.

One issue I still have like I did with a QNAP NAS is that when I try to transfer a wine prefix to the NAS it won’t copy over /dosdevices dir in prefix.

Originally I thought it was because QNAP NAS wouldn’t format EXT4, but Asustor does format EXT4, but it made no difference.

That said I haven’t encountered issues without the /dosdevices. The dir rebuilds on new systems.

One thing of note is my PC’s dual boot windows and map network drives.

Thanks for commenting. I don’t work or have education in IT, I simply learn what I need to accomplish what I want on computers.

First you’d have to check that NFS shares are actually available and being done on the NAS. It’d be weird if they didn’t seeing as they are Linux devices but who knows.

Going from there you can mount a share in the Terminal using mount -t nfs <IP>:/<share> /path/to/mountpoint. If that works you can put it into fstab the same way you do the SMB share.

Here’s a more detailed guide:

Nice, ya they’re is an NFS enable section in both NAS’s, I’ll check it out.

What about username/password? I’m not seeing anything about login setup?

thanks

NFS and SMB are not really interchangeable. the short of it is:

SMB: designed to share data across a network with security handled by the share host.

NFS: designed to share a device across a network, security will be handled by the system using the device.

have you checked to see if you have performance issues? if you do not, then just use SMB if you have been using it. i run mostly linux environment and use Active Directory and SMB or CIFS for everything.

When I tried NFS I got

mount.nfs: Connection refused

I’m confused on how to let NFS knows your login credentials.

With SMB I’m get 200 M/B plus with a zipped file.

My NAS has share folders, Virtual folders and CIFS folders. I’ve only made share folders.

you probably need to install nfs-common or nfs-utils depending on your distro you are connecting from. (on the remote pc, not the server)

you do not use credentials when connecting NFS.

also, why are you wanting to use NFS?

Probably because I mentioned it above :stuck_out_tongue:

yeah, well stop telling people to use NFS instead of SMB when they do things differently.

SMB/CIFS are fine for shares when you expect the server to handle access control. regardless of what the OS connecting is.

‘but papi NFS if for LINUX!1!!’

do not over complicate your network because someone ‘with more experience’ told you to do it differently.

wow chill man

I wasn’t “telling” anyone, I was asking a question since the NAS supported it anyway. I don’t care what people use lol