你的位置:首页 > 操作系统

[操作系统]修改nagios密码和问题


htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

密码

密码

service httpd restart

 

由于本屌丢掉一个s使/var/log/httpd/error.log中报错

[Thu Mar 26 09:54:42 2015] [error] [client 192.168.28.116] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Thu Mar 26 09:54:42 2015] [error] [client 192.168.28.116] access to /nagios failed, reason: verification of user id 'nagiosadmin' not configured
[Thu Mar 26 09:54:45 2015] [error] [client 192.168.28.116] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Thu Mar 26 09:54:45 2015] [error] [client 192.168.28.116] access to /nagios failed, reason: verification of user id 'nagiosadmin' not configured
[Thu Mar 26 09:54:45 2015] [error] [client 192.168.28.116] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Thu Mar 26 09:54:45 2015] [error] [client 192.168.28.116] access to /nagios failed, reason: verification of user id 'nagiosadmin' not configured
[Thu Mar 26 09:54:48 2015] [error] [client 192.168.28.116] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Thu Mar 26 09:54:48 2015] [error] [client 192.168.28.116] access to /nagios failed, reason: verification of user id 'nagiosadmin' not configured

这是默认password使用的htpasswd.users文件造成的,后来笨屌直接cp htpasswd.user htpasswd.users。刷新网页,nagios登录成功。