1

I am trying to export home directories from my NAS to ubuntu clients - the server is a TrueNAS Scale, which is Debian based. Kerberos works, so users get the proper tickets to authenticate to the server.

My main goal is that users can mount their home dirs off the server.

I have a share called home on the server with one directory per user. The home directory is owned by root, and the subdirectories are owned by the users. However, if I don't use maproot nor mapall, even if I manage to mount the share, the user can't write anything to his folder if mounting /home/folder.

If I use maproot=root, the user mounts it, but everything he writes is saved as root. I am lost here, but it seems there might be a problem with the id mapping. The uid/gid of the files are the same across server and client, the right names showing, etc. This makes me believe that the mapping is correct - however, when using maproot=root, why I end up having access to folders that don't belong to me, and why everything I create with that user is owned by root?

How I can properly export this so that I get root squashed, as well as that the users only get access to their own directories?

2
  • Assuming Kerberos is actually being used, there should be no "map" options needed for this to work, rather than adding more and more options. Is the initial mount done by root or by the user? Was your client machine's krb5.keytab accidentally left world-readable? When a user tries to access the mount for the first time, does the client's machine rpc.gssd show any activity, and does a ticket for nfs/yournas show up in their personal ticket cache (klist)? Mar 13, 2022 at 8:33
  • Thanks @user1686. It seems that the problem was idmapd.conf that didn't have a "Local-Realms" option configured correctly. Mar 16, 2022 at 11:50

1 Answer 1

0

The problem was that /etc/idmapd.conf didn't have a Local-Realms configured, which was necessary since the domain of the client isn't the same as the server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .