i need mount at boot a disk using NFS, to mount manually from console i type:

mount // -o username=administrator,password=pass /mnt/NAS

To /etc/fstab i added this line:  /mnt/NAS  nfs user=administrator,password=pass  0 0

But at reboot the disk is not mounted, where is the error?

  • What error do you get when you manually try to mount it? mount -a What error(s) show up in your NAS logs? – Aaron Jan 20 '16 at 15:12

I found the error, i need insert username instead of user  /mnt/NAS  nfs username=administrator,password=pass  0 0

You don't specify in your question whether you are trying to use NFSv3 or NFSv4, but neither supports a password parameter. The user parameter isn't even recognized by NFS or mount.nfs, it is handled purely by mount, and essentially allows non-root users to mount the filesystem. The user parameter (or users, if un-mounting is also desired) can be specified by itself with no additional arguments (i.e. mount -t nfs -o user) and indicates that any user can mount the filesystem.

Even after supplying the user option to mount, an NFS export that is listed in /etc/fstab will not be mounted as the logged-in user, because /etc/fstab is sourced before any user is logged in, so it will still be mounted as root. All working solutions that require supplying the user option to mount currently rely on also supplying the noauto option, and then running the mount command manually after login, as the user that you wish to mount the NFS export with.

NFS does not support sending plaintext passwords over the network, so you should never find yourself specifying a password as a mount option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.