Exam EX200 All QuestionsBrowse all questions from this exam
Question 33

SIMULATION -

Configure autofs.

Configure the autofs automatically mount to the home directory of LDAP, as required: server.domain11.example.com use NFS to share the home to your system. This file system contains a pre configured home directory of user ldapuserX.

Home directory of ldapuserX is:

server.domain11.example.com /home/guests/ldapuser

Home directory of ldapuserX should automatically mount to the ldapuserX of the local /home/guests Home directory's write permissions must be available for users ldapuser1's password is password

    Correct Answer:

    To configure autofs to automatically mount the home directory for ldapuserX from the NFS server, follow these steps: 1. Install autofs: `yum install -y autofs`. 2. Edit the auto.master file to specify the mount point and the map file: `vi /etc/auto.master`, then add `/home/guests /etc/auto.ldap`. 3. Create the map file for autofs: `vi /etc/auto.ldap` and add a line for the user ldapuserX: `ldapuserX -fstype=nfs,rw server.domain11.example.com:/home/guests/ldapuserX`. 4. Start and enable the autofs service: `systemctl start autofs`, `systemctl enable autofs`. This setup ensures that the home directory of ldapuserX from the NFS server is automatically mounted to the specified local directory, with write permissions available.

Discussion
Stachomir

vim /etc/auto.master.d/demo.autofs (/home/guestes /etc/auto.demo) vim /etc/auto.demo (ldapuserX -fstype=nfs,rw,sync server.domain11.example.com:/home/guests/ldapuserX) systemctl enable --now autofs

cloudyhr

we also have to edit /etc/exports and added below line /home/guests/ldapuserX 192.168.0.0/24(rw,sync,no_root_squash)

Hayder_Alobaidi

Is this still valid in REL8 ?

urWaifu

I had 1 try on the exam and yes, we have to set a home directory for a user using autofs

PENNSHARK

yum install autofs nfs-utils -y /home/guests /etc/auto.ldap ldapuserX -fstype=nfs,rw,nosuid,softserver.domain11.example.com:/home/guests/ldapuserX chown -R ldapuser1:ldapuser1 /home/guests/ldapuserX chmod -R 700 /home/guests/ldapuserX systemctl enable --now autofs

VforVodoo

vi /etc/auto.master add "/home/guests /etc/auto.ldap vi /etc/auto.ldap add "ldapuserX server.domain11.example.com:/home/guests/ldapuserX" #No need to specify -fstype since it was NFS, see 'man autofs'

VforVodoo

vi /etc/auto.master add "/home/guests /etc/auto.ldap vi /etc/auto.ldap add "ldapuserX server.domain11.example.com:/home/guests/ldapuserX" #No need to specify -fstype since it was NFS, see 'man autofs'