As root add viewuser password:
# htpasswd /etc/nagios/passwd viewuser
New password:
Re-type new password:
Then check passwd file:
# cat /etc/nagios/passwd
nagiosadmin:oFx/UdOcsrPCM
viewuser:bL1BGqHzoALVE
Add/Edit a read only user (viewuser in this example) in the proper /etc/nagios/cgi.cfg file sections:
# grep viewuser /etc/nagios/cgi.cfg
authorized_for_all_services=nagiosadmin,viewuser
authorized_for_all_hosts=nagiosadmin,viewuser
authorized_for_read_only=viewuser
Restart Apache web and Nagios servers:
# service nagios restart
# service httpd restart