1. 程式人生 > >monit(四)--以系統使用者登入監控頁面

monit(四)--以系統使用者登入監控頁面

配置好了監控頁面,並且也配置好了登入頁面的賬戶和密碼。

如果想以系統的賬戶去登入這個監控頁面應該如何做。

這就要使用到了PAM模組。

touch /etc/pam.d/monit

在檔案中新增下邊的指令

auth sufficient pam_securityserver.so

auth sufficient pam_unix.so

auth required pam_deny.so

account required pam_permit.so

然後在配置檔案中/etc/monitrc中新增

allow @test

這個命令的意思是隻要在系統test組中的賬戶,都可以登入。

group test

useradd -g test test

passwd test

輸入test的密碼,然後登入監控頁面就可以以這個賬戶和密碼去登入。