Exam EX200 All QuestionsBrowse all questions from this exam
Question 87

SIMULATION -

According the following requirements, configure autofs service and automatically mount to user's home directory in the ldap domain.

- Instructor.example.com (192.168.0.254) has shared /home/guests/ldapuserX home directory to your system by over NFS export, X is your hostname number.

- LdapuserX's home directory is exist in the instructor.example.com: /home/ guests/ldapuserX

- LdapuserX's home directory must be able to automatically mount to /home/ guests/ldapuserX in your system.

- Home directory have write permissions for the corresponding user.

However, you can log on to the ldapuser1 - ldapuser99 users after verification. But you can only get your corresponding ldapuser users. If your system's hostname is server1.example.com, you can only get ldapuser1's home directory.

    Correct Answer:

    To configure the autofs service to automatically mount the user's home directory in the LDAP domain according to the requirements, follow these steps: 1. Install the autofs package: 'yum install autofs'. 2. Create the directory for home mounts: 'mkdir -p /home/guests'. 3. Edit the '/etc/auto.master' file to define the mount point and the map file: '/home/guests /etc/auto.ldap'. 4. Create the '/etc/auto.ldap' file with the following content: 'ldapuserX -rw,intr instructor.example.com:/home/guests/ldapuserX', where X is your hostname number (for example, if your hostname is server1.example.com, use ldapuser1). 5. Ensure the '/etc/auto.ldap' file has the correct permissions: 'chmod 600 /etc/auto.ldap'. 6. Start and enable the autofs service: 'systemctl start autofs' and 'systemctl enable autofs'. 7. Verify that the home directory can be accessed and has write permissions for the corresponding user. You can do this by logging in as the specific ldapuser and checking the directory.

Discussion
PENNSHARK

yum install autofs vi /etc/auto.master /home/guests /etc/auto.ldapusers vi /etc/auto.ldapusers * -rw,intr,soft,instructor.example.com:/home/guests/ldapuser1 * -rw,intr,soft,instructor.example.com:/home/guests/ldapuser2 # Continue for ldapuser3 to ldapuser99 chmod 600 /etc/auto.ldapusers systemctl start autofs systemctl enable autofs cd /home/guests/ldapuser1 touch testfile