Nagios settings Users can only view all hosts and services

Source: Internet
Author: User
Tags command access

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.