第一步:使用ssh登錄esxi
esxcli system settings advanced list -o /User/execInstalledOnly
可能會得到以下內容
esxcli system settings advanced list -o /User/execInstalledOnlyPath: /User/ExecInstalledOnlyType: integerInt Value: 0Default Int Value: 1Min Value: 0Max Value: 1String Value: Default String Value: Valid Characters: Description: Runtime option to disable/enable execInstalledOnly. The runtime option is only checked if the related execInstalledOnly kernel option is disabled.Host Specific: falseImpact: none
-
參數當前狀態解析
當前值: Int Value: 00 = 禁用限制(允許執行未安裝的二進制文件,存在安全風險)
1 = 啟用限制(僅允許執行已安裝的二進制文件,推薦安全配置)
默認值: Default Int Value: 1
VMware 默認期望啟用此限制,說明開放執行權限是例外行為。
- 安全影響與建議
值 狀態 安全風險 適用場景
0 禁用限制 ?? 高風險 臨時調試、需運行外部工具時
1 啟用限制 ? 安全 生產環境、長期運行(默認配置)
- 安全影響與建議
# 啟用安全限制(恢復默認值)
esxcli system settings advanced set -o /User/execInstalledOnly -i 1
執行上述命令即可關閉
ps:實操來自于esxi8.0