unable to create new users on Nagios Log Server

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
[email protected]
Posts: 12
Joined: Thu Apr 07, 2016 7:25 pm

unable to create new users on Nagios Log Server

Post by [email protected] »

Hi All,

We are now able to setup the nagios log server completely and then a new issue has been detected when we are trying to add users. We are able to add the first 6 users but when we proceed in adding more users, we are now facing an error of "Could not create the user" and then we checked the audit logs, we can see from their that the "user was successfully created". But the user doesn't show on the User Management section of the nagios log server.

Any ideas on this issue?

Thank you for your time.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: unable to create new users on Nagios Log Server

Post by mcapra »

What version of Nagios Log Server are you using? I was unable to replicate this on 1.4.4.
Former Nagios employee
https://www.mcapra.com/
[email protected]
Posts: 12
Joined: Thu Apr 07, 2016 7:25 pm

Re: unable to create new users on Nagios Log Server

Post by [email protected] »

Hi, thank you for your reply.

Currently I'm using nagios log server version 1.4.3 at the moment.

my scenario is we have an admin accounts named nnit-1234, I will be able to create this account with no error or problems. But when I'm creating the second account named nnit-5678, I'm having the could not create user error from the nagios log server web interface. But when I checked the audit logs, it is showing that the user account was successfully created on the system.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: unable to create new users on Nagios Log Server

Post by rkennedy »

What is the full output of the following command? This will list what users are actually stored on the datbase.

Code: Select all

curl -XGET 'http://localhost:9200/nagioslogserver/_search?type=user&pretty'
(feel free to PM it over if you'd like, as there is a hashed password in the output)

I just tried to re-create this as a bug and was unsuccessful, and have 7 local accounts added to my machine. Are your accounts local or LDAP? Can you post a screenshot of your 'User Management' page for us to look at?
Former Nagios Employee
[email protected]
Posts: 12
Joined: Thu Apr 07, 2016 7:25 pm

Re: unable to create new users on Nagios Log Server

Post by [email protected] »

Hi,

please note that I'm trying to create accounts using the pattern of NNIT-XXXX. Attached are the requested screenshots. All accounts are local only, as we are yet to complete a new LDAP for the environment.

Thank you.
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: unable to create new users on Nagios Log Server

Post by rkennedy »

Did the password contain any special characters at all? I did some testing on my end, and was unable to recreate it, even with 15 accounts on the system.

Could you please run the following over the CLI to see if a manual account creating works?

Code: Select all

curl -XPOST 'http://localhost:9200/nagioslogserver/user/' -d '{"username":"someuser","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"[email protected]","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2015-01-23 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default"}'
Former Nagios Employee
[email protected]
Posts: 12
Joined: Thu Apr 07, 2016 7:25 pm

Re: unable to create new users on Nagios Log Server

Post by [email protected] »

Manual account creation worked on the CLI.

[root@dkrdswppnlsp01 ~]# curl -XPOST 'http://localhost:9200/nagioslogserver/user/' -d '{"username":"someuser","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"[email protected]","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2015-01-23 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default"}'
{"_index":"nagioslogserver","_type":"user","_id":"AViUZTJyEfsPnAEgcDi7","_version":1,"created":true}[root@dkrdswppnlsp01 ~]#


With regards to the passwords, there is no special characters containing it, it is just XXXX-1234.

BTW, if I create a normal account which is like ABCD as username and ABCD1234 as password, the account will be created and no error. It is just on the XXXX-XXXX format that I'm having the error.

can you tell me how I can create the hash code for the password so that I can try to add the users manually?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: unable to create new users on Nagios Log Server

Post by rkennedy »

I was able to recreate it, it appears the dashes in username is what makes it fail. What makes no sense is that it worked previously for you. I filed a bug report for this, #10229.

As for the hashing, you can use anything that'll generate a SHA256 hash. Something like this should work - http://onlinemd5.com/
Former Nagios Employee
[email protected]
Posts: 12
Joined: Thu Apr 07, 2016 7:25 pm

Re: unable to create new users on Nagios Log Server

Post by [email protected] »

Thank you for your assistance.

I will wait for the Bug file update and hope it gets resolved soon. :)
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: unable to create new users on Nagios Log Server

Post by rkennedy »

Sounds good - I'll leave this thread open should you have any further questions. You could also push them through manually using the API.
Former Nagios Employee
Locked