Exam EX200 All QuestionsBrowse all questions from this exam
Question 65

SIMULATION -

Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access the shared users home directory.

    Correct Answer:

    To resolve the issue of the shared users' home directory not being shown by the 'showmount -e localhost' command, you need to ensure that the NFS related services are properly configured and running. Here are the steps to troubleshoot and resolve the issue: 1. Verify that the directory is shared by checking the contents of '/etc/exports'. Use the command: 'cat /etc/exports'. Ensure that the home directory is listed in this file with appropriate access permissions. 2. Start the NFS service with the command: 'systemctl start nfs-server'. 3. Verify the status of the 'rpcbind' service, as 'portmap' has been replaced by 'rpcbind'. Use the command: 'systemctl start rpcbind'. 4. Ensure that these services start automatically on the next reboot with the commands: 'systemctl enable nfs-server' and 'systemctl enable rpcbind'. 5. Check the shared directories again with the 'showmount -e localhost' command to verify whether they are being shared. 6. Check the firewall settings. If the firewall is running, it might be blocking the necessary NFS ports. To flush iptables rules, use: 'iptables -F' and stop the iptables service using: 'systemctl stop iptables'. Alternatively, configure the firewall to allow NFS traffic by adding rules for 'nfs3', 'rpc-bind', and 'mountd' services, and then reload the firewall: 'firewall-cmd --add-service=nfs3 --permanent', 'firewall-cmd --add-service=rpc-bind --permanent', 'firewall-cmd --add-service=mountd --permanent', and 'firewall-cmd --reload'. Following these steps should help ensure that the shared home directories are correctly accessible and shown in the 'showmount -e localhost' command output.

Discussion
kenkct

$sudo su #showmount -e localhost (verify shared directory) #systemctl enable --now nfs-server #pwd (check user home directory) #echo '/home/user *(rw)' >> /etc/exports #exportfs -rv #showmount -e localhost (verify shared directory)

STFN2019

Full solution: NFS Server: - dnf install nfs-utils libnfsidmap - systemctl enable rpcbind & nfs-server - systemctl start rpcbind, nfs-server, rpc-statd, nfs-idmapd - vi /etc/exports - add /home/user 192.168.x.x (rw,sync,no_root_squash) - exportfs -rv - showmount -e - Optional: may need to enable the rule on firewalld or stop it altogether for it to work on remote clients NFS Client: - dnf install nfs-utils rpcbind - systemctl start rpcbind - ps -ef | egrep “firewalld:iptables” (may need to stop these two services, or add appropriate rules for mounting to work across server and client) - Create a mount point - Mount 192.168.x.x:/dir /mountpoint

ArchBishop

Note: portmap.service has been replaced with rpcbind.target && rpcbind.service.

ly01

The question states the directories are already shared, so my best guess is that the firewall is not open or some dependant service are not started: sudo firewall-cmd --add-service=nfs3 --permanent sudo firewall-cmd --add-service=rpc-bind --permanent sudo firewall-cmd --add-service=mountd --permanent sudo firewall-cmd --reload sudo firewall-cmd --list-all sudo systemctl status rpcbind.service sudo systemctl status nfs-server.service sudo systemctl status nfs-mountd.service