13.7. Adding More Nagios Users
Problem
You don't want to be stuck with administering Nagios all by yourself, but you want to add some junior admins to help out.
Solution
Your new admins must have system accounts on the Nagios server, and passwords in htpasswd.users:
# useradd -m -G nagioscmd admin2
# passwd admin2
# htpasswd /usr/local/nagios/etc/htpasswd.users admin2Then, you need to configure access to whatever Nagios functions you want them to have in cgi.cfg, using comma-delimited lists like this example shows:
authorized_for_all_services=nagios,admin2
authorized_for_all_hosts=nagios,admin2Restart Nagios to activate the changes:
# /etc/init.d/nagios restartDiscussion
Do not have any user in the nagios gro************up but nagios.
These aren't the most fine-grained access controls, but they do let you limit what your underlings can do:
authorized_for_system_informationView Nagios process information.
authorized_for_configuration_informationView all configuration information, both hosts and commands.
authorized_for_system_commandsShutdown, restart, and put Nagios on standby.
authorized_for_all_services, authorized_for_all_hostsView information for all hosts and services. By default, Nagios users can only view hosts or services they are named as contacts for.
authorized_for_all_service_commands, authorized_for_all_host_commandsIssue service or host commands. By default, Nagios users can only run commands for the hosts or services they are named as contacts for.
See Also
"CGI Configuration ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access