0
在配置文件/ etc/SSH/sshd_config中我要確定像一些特定用戶的PasswordAuthentication項(或組):Augeas - sshd的,配置的部分控制 - 條目相匹配
Match Group xyz_admin, xyz_support
PasswordAuthentication no
Match User yvonne,yvette
PasswordAuthentication yes
我不「不想幹擾或具有可以或可以不存在,像在相似但不相關的條目的任何控制:
Match User xavier
X11Forwarding yes
Match Group alice
AllowTcpForwarding yes
以下Augeas表達式創建我所需要的條目,但可能破壞現有的配置條目。
set /files/etc/ssh/sshd_config/Match[1]/Condition/Group "xyz_admin,xyz_support"
set /files/etc/ssh/sshd_config/Match[1]/Settings/PasswordAuthentication "no"
set /files/etc/ssh/sshd_config/Match[2]/Condition/User "yvonne,yvette"
set /files/etc/ssh/sshd_config/Match[2]/Settings/PasswordAuthentication "yes"
任何想法如何使這些表達式更具體,以避免搞亂任何現有的和無關的「匹配」條目?