按照以下要求,在servera上配置autofs自动挂载:,下面我们就来聊聊关于rhel8激活命令是什么?接下来我们就一起去了解一下吧!
rhel8激活命令是什么
按照以下要求,在servera上配置autofs自动挂载:
1)serverb通过NFS共享目录/rhome到你的系统,此文件系统中包含为用户ldapuser0预配置的家目录
2)预设用户ldapuser0的家目录应自动挂载到本地的/rhome/ldapuser0目录
3)预设用户ldapuser0的家目录是serverb.lab.example.com:/rhome/ldapuser0
4)预设用户ldapuser0的家目录应自动挂载到本地的/rhome/ldapuser0目录
5)挂载后的家目录必须可读写
安装autofs:
[root@localhost ~]# dnf install autofs -y
Last metadata expiration check: 23:13:23 ago on Tue 05 Jul 2022 09:22:21 PM CST.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
autofs x86_64 1:5.1.8-1.oe2203 everything 284 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 284 k
Installed size: 913 k
Downloading Packages:
autofs-5.1.8-1.oe2203.x86_64.rpm 622 kB/s | 284 kB 00:00
--------------------------------------------------------------------------------
Total 618 kB/s | 284 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : autofs-1:5.1.8-1.oe2203.x86_64 1/1
Running scriptlet: autofs-1:5.1.8-1.oe2203.x86_64 1/1
Verifying : autofs-1:5.1.8-1.oe2203.x86_64 1/1
Installed:
autofs-1:5.1.8-1.oe2203.x86_64
Complete!
[root@localhost ~]# systemctl enable --now autofs
配置autofs:
[root@localhost ~]# vim /etc/auto.master
/rhome /etc/auto.nfs
[root@localhost ~]# vim /etc/auto.nfs
ldapuser0 -rw serverb.lab.example.com:/rhome/ldapuser0
[root@localhost ~]# systemctl restart autofs
,