RHCSA Rapid Track
Performance Checklist
In this lab, you will install a package to support automount. Create an automount for ldapuserX's "home" directory from classroom.example.com, an NFSv4 host.
| Resources: | |
|---|---|
| Machines: | desktopX and classroom.example.com |
Outcomes
User ldapuserX will be able to successfully log in and use the
home directory mounted at
/home/guests/ldapuserX.
Reset the desktopX system.
Log into and set up your desktop system.
[student@desktopX ~]$lab nfs setupOpen a terminal.
Umbrella Corp uses a central server, classroom, to host the
home directories of their LDAP-based users. Users need to be able to
log in and have their home directories automount with read and write
access, ready for use.
Here are the key details you will need:
Username:
ldapuserXPassword:
kerberosclassroom.example.comis sharing/home/guests.desktopX mount point:
/home/guests/ldapuserXThe home directory should have read and write access.
When done with the work, reboot the desktopX machine, then run the command
lab nfs grade from the desktopX machine to verify the
work.
Install any packages needed to automount the home directory.
[student@desktopX ~]$sudo yum -y install autofsLoaded plugins: langpacks Resolving Dependencies ... Complete!Add an
auto.master.dconfiguration file that identifies the base directory and associated map file (use any name desired for the configuration file, but it must end with.autofs), and create the associated map file (use any name desired for the map file).Use vim to create and edit the
/etc/auto.master.d/home.autofsfile.[student@desktopX ~]$sudo vim /etc/auto.master.d/home.autofsAdd the line as follows:
/home/guests /etc/auto.home
Note
This solution is using
home.autofsas the master map file andauto.homeas the map file, but the file names are not important.Use vim to create and edit the
auto.homemap file.[student@desktopX ~]$sudo vim /etc/auto.homeAdd the line as follows:
* -rw,sync classroom.example.com:/home/guests/&
Enable and start the automount service.
Use ssh to switch to
ldapuserXonlocalhostand confirm the mount, and read/write access.Use ssh to log in as
ldapuserX.[student@desktopX ~]$ssh ldapuserX@localhostIf you see something similar to the following, type
yesto accept and continue.The authenticity of host 'localhost (::1)' can't be established. ECDSA key fingerprint is d9:cc:73:82:3b:8a:74:e4:11:2f:f3:2b:03:a4:46:4d. Are you sure you want to continue connecting (yes/no)?
yesEnter the password:
kerberos.ldapuserX@localhost's password:
kerberosVerify the current directory and read/write access.
Use pwd to verify the current directory.
[ldapuserX@desktopX ~]$pwd/home/guests/ldapuserXUse echo and cat to verify read and write access.
[ldapuserX@desktopX ~]$echo hello > test.txt[ldapuserX@desktopX ~]$cat test.txthelloUse exit or Ctrl+D to log out of
ldapuserX.
Reboot the
desktopXmachine, then run the command lab nfs grade from thedesktopXmachine to verify the work.