Page 1 of 1

Cannot create new user

Posted: Fri Jan 26, 2018 10:58 am
by bdoyd1e990
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,

Re: Cannot create new user

Posted: Fri Jan 26, 2018 2:12 pm
by dwhitfield
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.

Re: Cannot create new user

Posted: Mon Jan 29, 2018 4:42 am
by bdoyd1e990
No i'm not getting any errors when i try to change the nagiosadmin account

Re: Cannot create new user

Posted: Mon Jan 29, 2018 10:37 am
by dwhitfield
What's the output of ll /usr/local/nagios/etc/htpasswd.users?

What version of apache are you using?

Re: Cannot create new user

Posted: Tue Jan 30, 2018 4:40 am
by bdoyd1e990
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

Re: Cannot create new user

Posted: Tue Jan 30, 2018 4:07 pm
by scottwilkerson
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

Re: Cannot create new user

Posted: Wed Jan 31, 2018 4:01 am
by bdoyd1e990
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

Re: Cannot create new user

Posted: Wed Jan 31, 2018 1:07 pm
by dwhitfield
bdoyd1e990 wrote: Although I've found my issue.
Great news! Are we ready to lock this one up?

Re: Cannot create new user

Posted: Wed Mar 21, 2018 8:21 am
by bdoyd1e990
Yes this can be locked