EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 104


SIMULATION -

Configure autofs to automount the home directories of LDAP users as follows: host.domain11.example.com NFS-exports /home to your system.

This filesystem contains a pre-configured home directory for the user ldapuser11 ldapuser11's home directory is host.domain11.example.com /rhome/ldapuser11 ldapuser11's home directory should be automounted locally beneath /rhome as /rhome/ldapuser11

Home directories must be writable by their users

ldapuser11's password is 'password'.

Show Answer
Correct Answer:

To configure autofs for automounting LDAP user home directories, follow these steps: 1) Install autofs if it's not already installed: `dnf install -y autofs`. 2) Edit the auto.master file to define the base mount point: `vi /etc/auto.master` and add the line `/rhome /etc/auto.rhome`. 3) Create the indirect map file /etc/auto.rhome: `vi /etc/auto.rhome` and add the line `ldapuser11 -rw,sync host.domain11.example.com:/rhome/ldapuser11`. 4) Make sure the directory /rhome exists: `mkdir -p /rhome`. 5) Enable and start autofs service: `systemctl enable --now autofs`. 6) Verify the configuration by switching to the user ldapuser11: `su - ldapuser11` and check the home directory: `pwd` to ensure it's correctly mounted.

Discussion

4 comments
Sign in to comment
Stachomir
Jul 9, 2021

I think provided solution have mistake. I see resolution as below: vim /etc/auto.master.d/demo.autofs (/rhome /etc/auto.demo) vim /etc/auto.demo (ldapuser11 -rw,sync host.domain11.example.com:/home) As task mention that host.domain11.example.com exports /home dir ? Am I right?

preethi07
Sep 16, 2021

vim /etc/auto.master.d/direct.autofs / -/etc/auto.direct vim /etc/auto.direct ldapuser11 -rw,sync,nstype=nfs4 host.domain11.example.com:/home systemctl restart autofs systemctl enable --now autofs

STFN2019
Sep 28, 2021

This seems like the most straightforward solution. Thx mate!

ALBY19
Sep 6, 2020

vim /etc/auto.master.d/blah.autofs

Mahdi1985
Mar 18, 2022

hello, i have below full question for AutoFS: configure autofs to automount the home directories or remote users as follows: 1: utility.domain.com (172.1....) NFS-exports /rhome to your system. this filesystem contains a pre-configured home directory for the user remotuser16 2: remotuser16 home directory is utility.domain.com:/rhome/remotuser16 3: remotuser16 home directory should be automounted locally locally beneath /rhome as /rhome /remoteuser16 4: home directories must be writable by their users 5: remoteusers16 password is ratencot any one can help with the steps in sequence.

Hmenu0s
Jul 25, 2022

the question states " home directorie[s] must be writable by their user[s]" , so i assume they are referring to autofs indirect method mount. This will work for remoteuser16 as well as for future remoteuser homedir mounts. Here is how i will address it - # install autofs if not installed dnf install -y autofs # Create autofs file - defining the base mount dir . here it is /rhome - where all the homedirs will be mounted vi /etc/auto.master.d/auto.autofs /rhome /etc/home.indirect # create the indirect mount file vi /etc/home.indirect * -rw,sync host.domain11.example.com:/rhome/& # enable and start autofs systemctl enable --now autofs # Validate su - remoteuser16 pwd touch testfile