filmov
tv
15 RHCSA9 | EX200 Exam | autofs

Показать описание
# Question 15
# Perform following task on "node02" as "rhcsa9" user
Configure autofs to automount the home directories of user "userautofs01".
Note the following:
userautofs01 home directory should be auto mounted locally at "/shared" as "/shared/userautofs01"
Home directories must be writable by the users when you login as "userautofs01" on "node02"
# Solution 15
#######################################
--configure nfs server share directory
#######################################
-- Install required packages
sudo dnf install -y nfs* rpc*
-- enable and start nfs-server
sudo systemctl enable --now nfs-server
sudo systemctl status nfs-server
-- create shared directory
sudo mkdir /shared
sudo chmod 777 /shared
-- configure nfs share
sudo vi /etc/exports
/shared 10.10.10.93(rw,no_root_squash)
-- export nfs-share
sudo exportfs -avr
-- configure firewall
sudo firewall-cmd --add-service={nfs,mountd,rpc-bind} --permanent
sudo firewall-cmd --reload
-- create a user for demo purpose
sudo groupadd -g 1234 autofsusers
sudo useradd -d /shared/userautofs01 -u 1234 -g autofsusers userautofs01
sudo passwd userautofs01
#######################################
--configure autofs on node02
#######################################
- user "userautofs01" must already be present on node02
- we will create identical group and user on node02 as it is expected to be present on node02 server
sudo groupadd -g 1234 autofsusers
sudo useradd -d /shared/userautofs01 -u 1234 -g autofsusers userautofs01
sudo passwd userautofs01
---------------------------------------------------------------------------
- Install the autofs package if it is not already installed:
sudo yum install -y autofs nfs-utils
- Edit the autofs master configuration file using a text editor. For example:
- Add the following line to the end of the file:
- Add the following line to the file:
- Save the changes to the file and exit the text editor.
- Reload the autofs configuration for the changes to take effect:
sudo systemctl restart autofs
- Verify that the home directory is mounted correctly by switching the user on node02
su - userautofs01
- This command should show the contents of the userautofs01 home directory.
## Reference document
Thank you
Enjoy !!
# Perform following task on "node02" as "rhcsa9" user
Configure autofs to automount the home directories of user "userautofs01".
Note the following:
userautofs01 home directory should be auto mounted locally at "/shared" as "/shared/userautofs01"
Home directories must be writable by the users when you login as "userautofs01" on "node02"
# Solution 15
#######################################
--configure nfs server share directory
#######################################
-- Install required packages
sudo dnf install -y nfs* rpc*
-- enable and start nfs-server
sudo systemctl enable --now nfs-server
sudo systemctl status nfs-server
-- create shared directory
sudo mkdir /shared
sudo chmod 777 /shared
-- configure nfs share
sudo vi /etc/exports
/shared 10.10.10.93(rw,no_root_squash)
-- export nfs-share
sudo exportfs -avr
-- configure firewall
sudo firewall-cmd --add-service={nfs,mountd,rpc-bind} --permanent
sudo firewall-cmd --reload
-- create a user for demo purpose
sudo groupadd -g 1234 autofsusers
sudo useradd -d /shared/userautofs01 -u 1234 -g autofsusers userautofs01
sudo passwd userautofs01
#######################################
--configure autofs on node02
#######################################
- user "userautofs01" must already be present on node02
- we will create identical group and user on node02 as it is expected to be present on node02 server
sudo groupadd -g 1234 autofsusers
sudo useradd -d /shared/userautofs01 -u 1234 -g autofsusers userautofs01
sudo passwd userautofs01
---------------------------------------------------------------------------
- Install the autofs package if it is not already installed:
sudo yum install -y autofs nfs-utils
- Edit the autofs master configuration file using a text editor. For example:
- Add the following line to the end of the file:
- Add the following line to the file:
- Save the changes to the file and exit the text editor.
- Reload the autofs configuration for the changes to take effect:
sudo systemctl restart autofs
- Verify that the home directory is mounted correctly by switching the user on node02
su - userautofs01
- This command should show the contents of the userautofs01 home directory.
## Reference document
Thank you
Enjoy !!
Комментарии