3

I have a nfs server on Centos 7 with this in the /etc/exports file:
/export *(rw,sec=krb5p)

When I issue this command, it mounts successfully, as expected:
mount -t nfs -o sec=krb5p server.example.com:/export /mnt/export

It also mounts successfully in response to this command:
mount -t nfs server.example.com:/export /mnt/export

In both cases, running findmnt shows that the sec=krb5p option is being used. In the second case, is there a hidden default for the mount command, or does the client communicate with the nfs server and discover that sec=krb5p is the only permissible option?

1 Answer 1

5

RHEL/CentOS 7: Default is AUTH_SYS.

From RHEL 7 documentation:

sec=mode
    Its default setting is sec=sys, which uses local UNIX UIDs and GIDs. These use
        AUTH_SYS to authenticate NFS operations."
    sec=krb5 uses Kerberos V5 instead of local UNIX UIDs and GIDs to 
        authenticate users.
    sec=krb5i uses Kerberos V5 for user authentication and performs integrity
        checking of NFS operations using secure checksums to prevent
        data tampering.
    sec=krb5p uses Kerberos V5 for user authentication, integrity checking,
        and encrypts NFS traffic to prevent traffic sniffing. This is the most
        secure setting, but it also involves the most performance overhead.

Ubuntu 16.04: Negotiated.

From man nfs:

sec=flavor
    The security flavor to use for accessing files  on  this
    mount  point.   If the server does not support this fla‐
    vor, the mount operation fails.  If sec= is  not  speci‐
    fied, the client attempts to find a security flavor that
    both the client and the server supports.  Valid  flavors
    are  none,  sys,  krb5,  krb5i, and krb5p.  Refer to the
    SECURITY CONSIDERATIONS section for details.

OSX 10.12: Negotiated.

From man mount_nfs:

sec=<mechanism>
    Force a specific security mechanism to be used for the mount,
    where mechanism is one of: krb5p, krb5i, krb5, or sys.  When this
    option is not given the security mechanism will be negotiated
    transparently with the remote server.
2
  • Could you add which exact OS and man page you found that on? I can't find it on my system.
    – SauceCode
    Commented Sep 4, 2017 at 10:33
  • @SauceCode Updated for clarity.
    – Skyhawk
    Commented Sep 7, 2017 at 4:57

You must log in to answer this question.

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