Exam EX200 All QuestionsBrowse all questions from this exam
Question 12

SIMULATION -

Configure autofs to make sure after login successfully, it has the home directory autofs, which is shared as /rhome/ldapuser40 at the ip: 172.24.40.10. and it also requires that, other ldap users can use the home directory normally.

    Correct Answer:

    To configure autofs so that after a user logs in successfully, the home directory is shared as /rhome/ldapuser40 at IP 172.24.40.10, and to ensure other LDAP users can use the home directory normally, follow these steps: 1. Install autofs if it is not already installed: `yum install -y autofs`. 2. Enable and start the autofs service: `systemctl enable --now autofs.service`. 3. Verify the available NFS shares on the server: `showmount -e 172.24.40.10`. 4. Create a user without a home directory for ldapuser40: `useradd -M ldapuser40`. 5. Edit the autofs master map file: `vi /etc/auto.master` and add the line `/rhome /etc/auto.ldap`. 6. Create the map file for autofs: `vi /etc/auto.ldap` and add the line `ldapuser40 -rw,soft,intr 172.24.40.10:/rhome/ldapuser40`. Add another line `* -rw,soft,intr 172.24.40.10:/rhome/&` to allow other LDAP users to mount their home directories normally. 7. Reload the autofs service to apply the changes: `systemctl reload autofs`. This setup ensures that ldapuser40 and other LDAP users can access their home directories as specified.

Discussion
AbidBajwa

yum install autofs showmount -e 172.24.40.10 ##Create user without a home directory useradd -M ldapuser40 ##Create file vi /etc/auto.master.d/autohome.autofs ##add this line /- /etc/auto.home ##create this file vi /etc/auto.home ##Add this line and save file /home/ldapuser40 -rw,sync 172.24.40.10:/rhome/ldapuser40 systemctl enable --now autofs.service

lgu

Something like : dnf install autofs -y systemctl enable autofs vi /etc/auto.master /rhome/ldapuser40 /etc/auto.examtopic vi /etc/auto.examtopic ldapdir 172.24.40.10:/rhome/ldapuser40 systemctl start autofs mount

safodz

what do you means by ldapdir? should be ldapuser40 172.24.40.10:/rhome/ldapuser40

wizojlo

I understood the task differently, like we need to mount server path to ldapuser40 folder under /home. Might be wrong, correct me if so. #dnf install -y autofs (installs required package) #systemctl enable --now autofs (enable service at next boot and start it immediately) #showmount -e 172.24.40.10 (to check existing NFS export on the server) #vim /etc/auto.master (edit master file) #/home /etc/test.mapfile (add this line, configures /home as main mount point where everything defined in test.mapfile will be mounted under) #vim /etc/test.mapfile (creates and starts editing the mapfile) #ldapuser40 172.24.40.10:/rhome/ldapuser40 (add this line, first part is the folder which will be created under /home defined previously in master, and contents will be retrieved from server path on the right). #systemctl reload autofs (reloads all autofs configs)

wizojlo

Forgot to add #useradd -M ldapuser40 (after showmount in 3rd line - this will create the user without home folder)