Cannot create new user

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Cannot create new user

Postby bdoyd1e990 » Fri Jan 26, 2018 10:58 am

I am running nagios core 4.3.2 on a Red hat 7 server,
And I wanted to create a read-only user for the web gui, I added a user to htpasswd.users

and added the username as below into cgi.cfg

Code: Select all
[root@n0lnagp01 nagios]# grep nagiosview cgi.cfg
authorized_for_all_services=nagiosadmin,nagiosview
authorized_for_all_hosts=nagiosadmin,nagiosview
authorized_for_read_only=nagiosview


I've tried restarting httpd & nagios
and even tried a reboot in case there were other processes than need restarting.
But my new user doesn't seem to be getting created, as from the httpd error_log i get this error

Code: Select all
[root@n0lnagp01 nagios]# grep nagiosview --color /var/log/httpd/error_log
[Fri Jan 26 12:01:00.588984 2018] [auth_basic:error] [pid 33630] [client 10.60.147.113:59438] AH01618: user nagiosview not found: /nagios


And If i try to change the nagiosadmin password using htpasswd ./htpasswd.users nagiosadmin it doesn't get changed,
bdoyd1e990
 
Posts: 12
Joined: Wed Oct 11, 2017 2:57 am

Re: Cannot create new user

Postby dwhitfield » Fri Jan 26, 2018 2:12 pm

bdoyd1e990 wrote:I
And If i try to change the nagiosadmin password using htpasswd ./htpasswd.users nagiosadmin it doesn't get changed,


Do you get any errors when trying to change the nagiosadmin password? Ultimately if you aren't able to change the password of an apache account, that sounds like an apache problem, not a nagios problem but we can certainly do some digging.
Need additional support for CentOS or ubuntu? Try OpenLogic: https://www.openlogic.com/talk-to-expert

We can write Nagios plugins for you!

We are hiring: https://www.perforce.com/careers
dwhitfield
Former Nagios Staff
 
Posts: 4582
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN

Re: Cannot create new user

Postby bdoyd1e990 » Mon Jan 29, 2018 4:42 am

No i'm not getting any errors when i try to change the nagiosadmin account
bdoyd1e990
 
Posts: 12
Joined: Wed Oct 11, 2017 2:57 am

Re: Cannot create new user

Postby dwhitfield » Mon Jan 29, 2018 10:37 am

What's the output of ll /usr/local/nagios/etc/htpasswd.users?

What version of apache are you using?
Need additional support for CentOS or ubuntu? Try OpenLogic: https://www.openlogic.com/talk-to-expert

We can write Nagios plugins for you!

We are hiring: https://www.perforce.com/careers
dwhitfield
Former Nagios Staff
 
Posts: 4582
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN

Re: Cannot create new user

Postby bdoyd1e990 » Tue Jan 30, 2018 4:40 am

My htpasswd file is in a different location, so here is the requested info

Code: Select all
[root@n0lnagp01 ~]# ll /etc/nagios/htpasswd.users
-rw-r--r--. 1 root root 99 Jan 26 12:00 /etc/nagios/htpasswd.users


[root@n0lnagp01 ~]# httpd -v
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Server built:   Mar  8 2017 05:09:47
bdoyd1e990
 
Posts: 12
Joined: Wed Oct 11, 2017 2:57 am

Re: Cannot create new user

Postby scottwilkerson » Tue Jan 30, 2018 4:07 pm

bdoyd1e990 wrote:My htpasswd file is in a different location, so here is the requested info

Code: Select all
[root@n0lnagp01 ~]# ll /etc/nagios/htpasswd.users
-rw-r--r--. 1 root root 99 Jan 26 12:00 /etc/nagios/htpasswd.users


[root@n0lnagp01 ~]# httpd -v
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Server built:   Mar  8 2017 05:09:47


Did you add the user to this file?
Code: Select all
htpasswd /etc/nagios/htpasswd.users nagiosview
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 18477
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Cannot create new user

Postby bdoyd1e990 » Wed Jan 31, 2018 4:01 am

Yes I added the user to the correct file,
Although I've found my issue.

I do feel a bit stupid as I missed where the filename is specified as passwd.users not htpasswd.users in httpd.conf
bdoyd1e990
 
Posts: 12
Joined: Wed Oct 11, 2017 2:57 am

Re: Cannot create new user

Postby dwhitfield » Wed Jan 31, 2018 1:07 pm

bdoyd1e990 wrote:Although I've found my issue.


Great news! Are we ready to lock this one up?
Need additional support for CentOS or ubuntu? Try OpenLogic: https://www.openlogic.com/talk-to-expert

We can write Nagios plugins for you!

We are hiring: https://www.perforce.com/careers
dwhitfield
Former Nagios Staff
 
Posts: 4582
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN

Re: Cannot create new user

Postby bdoyd1e990 » Wed Mar 21, 2018 8:21 am

Yes this can be locked
bdoyd1e990
 
Posts: 12
Joined: Wed Oct 11, 2017 2:57 am


Return to Community Support

Who is online

Users browsing this forum: Mawikvok and 20 guests