nagios-4.0.6 Add user and set to view all hosts and services only, cannot modify the configuration of any host and service
1. Create a new Nagios Management Interface Authentication User
[Email protected] ~]# htpasswd/usr/local/nagios/etc/htpasswd.users Yangkuo
New Password:
Re-type New Password:
Adding Password for user Yangkuo
2. Configure cgi.cfg file, yellow for new content
[Email protected] ~]# sed-i ' 181a Authorized_for_read_only=yangkuo '/usr/local/nagios/etc/cgi.cfg
[[email protected] ~]# sed-n ' 181,187p '/usr/local/nagios/etc/cgi.cfg # no need to restart Apache and nagios Services
#a Uthorized_for_read_only=user1,user2
Authorized_for_read_only=yangkuo # allow viewing only, cannot manage
# Statusmap BACKGROUND IMAGE
at this point the user Yangkuo can already log in to the Nagios main interface, but does not have permission to see any information from Nagios clients
[Email protected] ~]# sed-i ' 156,157s/$/&,yangkuo/g '/usr/local/nagios/etc/cgi.cfg
[[email protected] ~]# sed-n ' 153,161p '/usr/local/nagios/etc/cgi.cfg # no need to restart Apache and nagios Services
# to authorize any user hasauthenticated to the Web server.
Authorized_for_all_services=wangning, Yangkuo
Authorized_for_all_hosts=wangning, Yangkuo
# GLOBAL Host/service COMMAND ACCESS
You can view any hosts and services at this time, but you cannot configure
This article is from the "Galloping Camel" blog, make sure to keep this source http://wn2100.blog.51cto.com/9915310/1954577
Nagios settings Users can only view all hosts and services