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.
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
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)
Forgot to add
#useradd -M ldapuser40 (after showmount in 3rd line - this will create the user without home folder)
upvoted 2 times
...
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
AbidBajwa
Highly Voted 3 years, 1 month agolgu
Highly Voted 3 years, 1 month agosafodz
3 years agowizojlo
9 months, 2 weeks agowizojlo
9 months, 2 weeks ago