首页 > 代码库 > RHCE7.0答案之Autofs自动挂载
RHCE7.0答案之Autofs自动挂载
Autofs自动挂载:
yum -y install autofs
vim /etc/auto.master 在文件中添加下面行
/home/guests /etc/auto.tianyun
vim /etc/auto.tianyun 子挂载点监控
ldapuser0 -rw,sync classroom:/home/guests/ldapuser0
systemctl enable autofs.service
systemctl restart autofs.service
ls /home/guests 自动创建父挂载点
ls /home/guests/abc 被监控,目标文件不存在
测试 ssh ldapuser0@localhost, 要是再使用ldapuser1呢,则家目录又没有挂载了,那怎么办呢?
autofs自动挂载用户家目录:
vim /etc/auto.tianyun, 添加 * -rw,sync classroom:/home/guests/&
systemctl restart autofs.service
vim /etc/sysconfig/autofs TIMEOUT=300
RHCE7.0答案之Autofs自动挂载
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。