nagios修改密码需要使用命令htpasswd
1. which htpasswd 察看这个命令是否存在。如果不存在,使用locate/find寻找。
2. grep 'authorized' /usr/local/nagios/etc/cgi.cfg 察看用户名。例如:
authorized_for_system_information=nagiosadmin,guest authorized_for_configuration_information=nagiosadmin,guest authorized_for_system_commands=nagiosadmin authorized_for_all_services=nagiosadmin,guest authorized_for_all_hosts=nagiosadmin,guest authorized_for_all_service_commands=nagiosadmin authorized_for_all_host_commands=nagiosadmin #authorized_for_read_only=user1,user2
3. 使用命令:htpasswd -c /usr/local/nagios/etc/htpasswd.users username 即可。
4. htpasswd Apache用来生成密码,Nginx也使用其生为StubStatus模块生成密码。例如:
/usr/local/apache/bin/htpasswd -c /opt/nginx/conf/htpasswd webadmin