Hacker News new | ask | show | jobs
by asveikau 5 days ago
NFS in particular is an old protocol and authentication was bolted on later in its long history. It's pretty common to configure it in a way that you trust the client when they say they're root. This adds to the perception that nobody would assume it's safe to expose.
2 comments

NFSv3 assumes that uid/gid synchronization is in place, and maps root activity on the shared volume to some kind of nobody (unless the volume is exported nosquash). The username is irrelevant; the uid controls access (AFAIK).

NFSv4 needs idmapd, which is a different beast altogether.

NFSv4 can also run in the sec=sys mode, without idmapd, where it blindly trusts the client-supplied UID, exactly as NFSv3 does.
I did not know that. Thanks!
also you can nail on kerberos to actually enforce permissions if you're still just doing uid/guid matching.

Still, getting root on your internal fileserver isn't great.

> It's pretty common to configure it in a way that you trust the client when they say they're root

This is how you can tell you’re reading a post from a Real Old Time hacker. Hasn’t been that way for a long time.

The root_squash option has been default since as long as I can remember.
I will take that as a compliment.