Log into NFS Share on Linux

WDBlue

Dabbler
Joined
Feb 25, 2023
Messages
20
Is it possible to have to login to an NFS share on Linux like it is using SMB on windows? I am having so much difficulty getting old files out of the datasets from when I put them on the NAS while using a Windows machine. I am now using a Debian 12 OS and have had nothing but problems. I have even gone to the extent of logging into the NAS via command line and doing a chmod on the files to try to make them match the user that I have on the Debian machine. I have tried editing the passwd file to make the UIDs match. None of that seems to work. Any help at all would be most appreciated.
 

Patrick_3000

Contributor
Joined
Apr 28, 2021
Messages
167
I'm not sure if I understand exactly what you're asking, but I will offer this:

The easiest and most reliable way to log into NFS shares from a Linux Debian-based system is to add an entry in fstab (/etc/fstab) mounting the share in whatever folder you want. I usually mount them in /mnt. There are numerous online sources describing how to do this. You will probably need to add credentials either in the fstab entry or, better yet, in a credentials file in your home directory.

After you do that and type "sudo mount -a" from the command line, you shouldn't need to do anything else, assuming the NFS share is properly configured in SCALE under "Shares."

I'm not sure if that's what you're asking about, but if it's not, please provide a more detailed description and I'll try to point ou in the right direction if I can.
 

WDBlue

Dabbler
Joined
Feb 25, 2023
Messages
20
I'm not sure if I understand exactly what you're asking, but I will offer this:

The easiest and most reliable way to log into NFS shares from a Linux Debian-based system is to add an entry in fstab (/etc/fstab) mounting the share in whatever folder you want. I usually mount them in /mnt. There are numerous online sources describing how to do this. You will probably need to add credentials either in the fstab entry or, better yet, in a credentials file in your home directory.

After you do that and type "sudo mount -a" from the command line, you shouldn't need to do anything else, assuming the NFS share is properly configured in SCALE under "Shares."

I'm not sure if that's what you're asking about, but if it's not, please provide a more detailed description and I'll try to point ou in the right direction if I can.
I have temporarily mounted the different datasets on my Debian desktop, but have decided that until I can get files to move back and forth with no issues, that I will refrain from putting the mounts into the fstab. the problem is that I can not push files off of the NAS to the desktop, but I can copy files off of the NAS from the desktop (i.e. pulling them off of the server from the desktop). I found that if I change the NFS to v4 the restrictions to the ACL is a bit more relaxed, but that may just be because I heard someone else tell me that. I also found out that by changing the User Owner and Group Owner to root/wheel, that I was able to pull the files off of the NAS from the desktop, but I still can not push files onto the NAS, nor can I be on the NAS and push files off of the NAS to the desktop. I know this all sounds a bit confusing and very complicated. Trust me, I am starting to go bald from this. Frustration is a term used lightly in this issue.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Why don't you use SMB?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
That is for Windows from all I have learned over the years...
Linux has an SMB client. The only way to have robust authentication in NFS is to use kerberos + NFS4 (you mount with kerberos option, kinit on client, then do ops on mount). The setup for this though is generally beyond abilities of non-professionals.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Not quite. Apple is going strictly SMB and Linux also supports it.

Roughly, NFS is server to server - both systems must have identical user IDs (or a mapping set up) and it is implicitly assumed that user "fred" on the server is the same person as user "fred" on the client and that the client can be trusted to pass the correct UID. There is up to NFS3 no authentication. Mounts are generally static and configured by an administrator.

SMB is a protocol where a user session can mount shares from a server with user based authentication. The mounts come and go as the user sees fit. The user on the server and the user on the client need not be identical. The server enforces access control based on the authentication credentials.

So I think in your case SMB might fit better.
 

WDBlue

Dabbler
Joined
Feb 25, 2023
Messages
20
Not quite. Apple is going strictly SMB and Linux also supports it.

Roughly, NFS is server to server - both systems must have identical user IDs (or a mapping set up) and it is implicitly assumed that user "fred" on the server is the same person as user "fred" on the client and that the client can be trusted to pass the correct UID. There is up to NFS3 no authentication. Mounts are generally static and configured by an administrator.

SMB is a protocol where a user session can mount shares from a server with user based authentication. The mounts come and go as the user sees fit. The user on the server and the user on the client need not be identical. The server enforces access control based on the authentication credentials.

So I think in your case SMB might fit better.
That sounds to me like a much better fit. I guess I'll start learning how to implement SMB on Linux. Thanks for your input.
 

WDBlue

Dabbler
Joined
Feb 25, 2023
Messages
20
Linux has an SMB client. The only way to have robust authentication in NFS is to use kerberos + NFS4 (you mount with kerberos option, kinit on client, then do ops on mount). The setup for this though is generally beyond abilities of non-professionals.
Well, I've messed with only one system that had Kerberos on it and I did not like it at all. I know it has a purpose and a function. That is just not for me. I think I'll be taking the SMB route.
 
Top