我写了 PowerShell 程序,适用于 Windows AD DS里,交互式创建 automount 信息。降低管理员的运维难度。
在加入了 AD 并配置了 autofs 的 Linux 客户端,看挂载效果,
[root@rd-172-31-0-150 ~]# df -h /home /tools
Filesystem Size Used Avail Use% Mounted on
auto.home 0 0 0 - /home
ds923p.icinfra.cn:/volume1/lab-tools 200G 33G 168G 17% /tools
[root@rd-172-31-0-150 ~]# su - wanlin.wang
Last login: Sat Mar 1 15:37:05 CST 2025 on pts/0
[wanlin.wang@rd-172-31-0-150 ~]$ df -h .
Filesystem Size Used Avail Use% Mounted on
ds923p.icinfra.cn:/volume1/lab-home/wanlin.wang 100G 17G 84G 17% /home/wanlin.wang