LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to create another user for Nagios web interface (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-another-user-for-nagios-web-interface-607353/)

bartsimpson 12-17-2007 09:24 AM

How to create another user for Nagios web interface
 
Hi


I am new to here and looking for help on nagios. I already installed nagios and try to create a another user for web interface. I am running on sues linux

Thanks advance

doombob 12-17-2007 09:55 AM

Moderator Note: beware the -c option suggested here creates a new password file and deletes all previously stored passwords, as explained in post #7 below. Don't use -c if you want simply to add a user!


I think all you need to do is run the following commands:

Code:

htpasswd2 -c /usr/local/nagios/etc/htpasswd.users newusername
(follow instructions on screen for inputting a password)

Then restart Apache

Code:

service apache2 restart

bartsimpson 12-17-2007 12:43 PM

Quote:

Originally Posted by doombob (Post 2993467)
I think all you need to do is run the following commands:

Code:

htpasswd2 -c /usr/local/nagios/etc/htpasswd.users newusername
(follow instructions on screen for inputting a password)

Then restart Apache

Code:

service apache2 restart

Work great...Thank You very much

bartsimpson 12-18-2007 07:07 AM

i created another user however when i log on and some pages i see this msg "It appears as though you do not have permission to view information for any of the services you requested..."


how do i make new user to become super admin or do i need configuration anything?

Samantha Cruz 09-29-2010 11:38 AM

How to create another user for Nagios web interface
 
You are getting that error because you haven't added the user permissions in the cgi.cfg file - There are several directives that list the names of accounts that are allowed to access various cgi functions such as

authorized_for_system_information=nagiosadmin
authorized_for_all_hosts=nagiosadmin

.. read the descriptions of each in the cgi.cfg file before blindly adding users to each appropriate permission.


(yes I know this is old - i answered it for those that search this question in the future)

decreasedsales 10-04-2010 01:48 PM

Quote:

Originally Posted by Samantha Cruz (Post 4112809)
(yes I know this is old - i answered it for those that search this question in the future)

Thanks for posting a response, Samantha . I am one of the future questioners you so kindly posted for.

vlcinsky 10-18-2010 09:07 AM

WARNING using -c rewrites old password
 
Hi
To me the -c created new file and my old passwords got lost.
Exactly as command line tells "-c Create a new file"

I had to use backup.

So adding
[QUOTE=doombob;2993467]I think all you need to do is run the following commands:

Code:

htpasswd2 -c /usr/local/nagios/etc/htpasswd.users newusername
So proper use for ADDING is WITHOUT -c SWITCH
Code:

htpasswd2 /usr/local/nagios/etc/htpasswd.users newusername

etegration 11-02-2011 11:52 PM

[QUOTE=vlcinsky;4131301]Hi
To me the -c created new file and my old passwords got lost.
Exactly as command line tells "-c Create a new file"

I had to use backup.

So adding
Quote:

Originally Posted by doombob (Post 2993467)
I think all you need to do is run the following commands:

Code:

htpasswd2 -c /usr/local/nagios/etc/htpasswd.users newusername
So proper use for ADDING is WITHOUT -c SWITCH
Code:

htpasswd2 /usr/local/nagios/etc/htpasswd.users newusername

you will still get errors.

Quote:

It appears as though you do not have permission to view information for any of the hosts you requested...
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
is there a clean way?

angel115 11-11-2011 02:55 PM

If you still have some permission issue:
1. edit your cgi.cfg and add the users to the lines where "nagiosadmin" is, not all of them, it depend of the right you want to give to the user
Code:

authorized_for_system_information=nagiosadmin,user1,user2,...usern
2. Create the user and the password for the user you just add to your config file whithout the -c.
Code:

htpasswd2 /usr/local/nagios/etc/htpasswd.users user2
3. Restart apache.
Code:

/etc/init.d/apache2 restart
I've used nagios for years now, and I always did like this.

PS: For security reason I would recommend to remove the nagios admin user from your config file

Stay secure,
Angel.

srijai980 03-20-2014 05:59 AM

Hi,

I tried this command but it threw me an error saying "You can't edit this file". Use -c to create a new file. May i know why is it saying so as i have logged in as "root" user in my SUSE LInux?

Thanks

TB0ne 03-20-2014 08:51 AM

Quote:

Originally Posted by srijai980 (Post 5137972)
Hi,
I tried this command but it threw me an error saying "You can't edit this file". Use -c to create a new file. May i know why is it saying so as i have logged in as "root" user in my SUSE LInux?

First, please re-read the LQ rules...you have re-opened a thread that has been closed now for THREE YEARS, and hijacked it with a different question. Open your own thread for your own question. Second, the original command was from 2007...SEVEN YEARS AGO....wouldn't it seem logical that things have changed since then??

http://soeasytomakeitwork.wordpress....web-interface/

srijai980 03-26-2014 08:49 AM

Quote:

Originally Posted by TB0ne (Post 5138042)
First, please re-read the LQ rules...you have re-opened a thread that has been closed now for THREE YEARS, and hijacked it with a different question. Open your own thread for your own question. Second, the original command was from 2007...SEVEN YEARS AGO....wouldn't it seem logical that things have changed since then??

http://soeasytomakeitwork.wordpress....web-interface/

I am really sorry for re-opening this thread as i thought it was still open and users will look into it. By the way nothing has changed in the command as i was able to execute it successfully when i tried it again :)

Thanks


All times are GMT -5. The time now is 06:19 AM.