最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

mount - How to prompt for credentials when mounting NFS server using 'fuse-nfs' - Stack Overflow

programmeradmin5浏览0评论

I have two Ubuntu machines, one serving as an NFS server (Machine A) and the other as an NFS client (Machine B). I have configured the NFS server on Machine A as follows:

On Machine A:

  • Installed the NFS server package: sudo apt install nfs-kernel-server.
  • Created a mount directory: sudo mkdir /mnt/myshareddir.
  • Edited the /etc/exports file to allow access to the directory: /mnt/myshareddir *(rw,sync,no_subtree_check,no_root_squash).
  • Restarted the NFS server service: sudo systemctl restart nfs-kernel-server.

On Machine B, I have installed the fuse-nfs binary from the fuse-nfs repository and configured it to mount the NFS server as follows:

  • Created a mount point: mkdir -p /home/pankaj/mymountdir.
  • Mounted the NFS server using the fuse-nfs command: fuse-nfs -n nfs://<nfs-server-ip>/mnt/myshareddir -m /home/pankaj/mymountdir.

However, I am able to mount the NFS server without being prompted to enter credentials. I would like to configure the system to prompt for credentials every time I mount the NFS server. Has anyone encountered a similar issue or have any suggestions to resolve this? Am I missing something here?

I appreciate your help in advance. Thank you.

I have two Ubuntu machines, one serving as an NFS server (Machine A) and the other as an NFS client (Machine B). I have configured the NFS server on Machine A as follows:

On Machine A:

  • Installed the NFS server package: sudo apt install nfs-kernel-server.
  • Created a mount directory: sudo mkdir /mnt/myshareddir.
  • Edited the /etc/exports file to allow access to the directory: /mnt/myshareddir *(rw,sync,no_subtree_check,no_root_squash).
  • Restarted the NFS server service: sudo systemctl restart nfs-kernel-server.

On Machine B, I have installed the fuse-nfs binary from the fuse-nfs repository and configured it to mount the NFS server as follows:

  • Created a mount point: mkdir -p /home/pankaj/mymountdir.
  • Mounted the NFS server using the fuse-nfs command: fuse-nfs -n nfs://<nfs-server-ip>/mnt/myshareddir -m /home/pankaj/mymountdir.

However, I am able to mount the NFS server without being prompted to enter credentials. I would like to configure the system to prompt for credentials every time I mount the NFS server. Has anyone encountered a similar issue or have any suggestions to resolve this? Am I missing something here?

I appreciate your help in advance. Thank you.

Share Improve this question asked Jan 20 at 12:02 pkthapapkthapa 1,0712 gold badges17 silver badges28 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

NFS does not authenticate using credentials such as user and password. It restricts access based on client IP address*. Meaning you authenticate by your machine IP, not which user are you.

You have defined the IP restriction as * meaning "no restriction" (any IP).

See similar question Mount network share with nfs with username / password.

*You can also authenticate to nfsv4 using Kerberos - a very complicated setup is required.

发布评论

评论列表(0)

  1. 暂无评论