Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-17-2007, 09:24 AM
|
#1
|
LQ Newbie
Registered: Dec 2007
Posts: 9
Rep:
|
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
|
|
|
12-17-2007, 09:55 AM
|
#2
|
LQ Newbie
Registered: Oct 2007
Location: KC, MO
Distribution: CentOS
Posts: 9
Rep:
|
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
Last edited by colucix; 01-02-2013 at 03:21 AM.
|
|
|
12-17-2007, 12:43 PM
|
#3
|
LQ Newbie
Registered: Dec 2007
Posts: 9
Original Poster
Rep:
|
Quote:
Originally Posted by doombob
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
|
|
1 members found this post helpful.
|
12-18-2007, 07:07 AM
|
#4
|
LQ Newbie
Registered: Dec 2007
Posts: 9
Original Poster
Rep:
|
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?
|
|
|
09-29-2010, 11:38 AM
|
#5
|
LQ Newbie
Registered: May 2009
Posts: 1
Rep:
|
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)
Last edited by Samantha Cruz; 09-29-2010 at 11:39 AM.
|
|
1 members found this post helpful.
|
10-04-2010, 01:48 PM
|
#6
|
LQ Newbie
Registered: Mar 2010
Location: Kennesaw, GA
Distribution: fedora
Posts: 1
Rep:
|
Quote:
Originally Posted by Samantha Cruz
(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.
|
|
|
10-18-2010, 09:07 AM
|
#7
|
LQ Newbie
Registered: Jan 2005
Location: Czech Republic, Ostrava
Distribution: RH, Debian
Posts: 2
Rep:
|
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
|
|
|
11-02-2011, 11:52 PM
|
#8
|
LQ Newbie
Registered: Jan 2004
Posts: 26
Rep:
|
[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
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?
|
|
|
11-11-2011, 02:55 PM
|
#9
|
Member
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542
Rep:
|
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.
|
|
|
03-20-2014, 05:59 AM
|
#10
|
LQ Newbie
Registered: Mar 2014
Posts: 2
Rep: 
|
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
|
|
|
03-20-2014, 08:51 AM
|
#11
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,790
|
Quote:
Originally Posted by srijai980
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/
|
|
|
03-26-2014, 08:49 AM
|
#12
|
LQ Newbie
Registered: Mar 2014
Posts: 2
Rep: 
|
Quote:
Originally Posted by TB0ne
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 07:51 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|