Hello,
I have one admin user nagiosadmin to access nagios GUI.
But want another just read only user which is able to access Nagios.
Can someone help me out as to how to create the read-only user for the same.
Regards,
Shreyansh
Read only user to be created for users to access nagios GUI
Re: Read only user to be created for users to access nagios
First, generate a new htaccess file for your read-only user:
This creates a file in /root called readuser.txt:
Cat that file, and append the output to /usr/local/nagios/etc/htpasswd.users
Now test access with that user on your Nagios web GUI.
Note that the user does not yet have any permissions.
To provide readuser with proper permissions, edit your nagios cgi file:
Look for the directives:
Add the new user:
Now, you need to restart the Nagios daemon.
Test to ensure that the user is read-only and you should be good to go.
Best,
Jesse
Code: Select all
htpasswd -c /root/readuser.txt readuserThis creates a file in /root called readuser.txt:
Code: Select all
cat /root/readuser.txtreaduser:abcdefg.1234567
Cat that file, and append the output to /usr/local/nagios/etc/htpasswd.users
Code: Select all
cat /root/readuser.txt >> /usr/local/nagios/etc/htpasswd.usersNote that the user does not yet have any permissions.
To provide readuser with proper permissions, edit your nagios cgi file:
Code: Select all
vi /usr/local/nagios/etc/cgi.cfgCode: Select all
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadminCode: Select all
authorized_for_all_services=nagiosadmin,readuser
authorized_for_all_hosts=nagiosadmin,readuserCode: Select all
service nagios restartBest,
Jesse