Page 1 of 2

unable to create new users on Nagios Log Server

Posted: Thu Nov 17, 2016 8:38 pm
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.

Re: unable to create new users on Nagios Log Server

Posted: Fri Nov 18, 2016 11:01 am
by mcapra
What version of Nagios Log Server are you using? I was unable to replicate this on 1.4.4.

Re: unable to create new users on Nagios Log Server

Posted: Sun Nov 20, 2016 10:35 pm
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.

Re: unable to create new users on Nagios Log Server

Posted: Mon Nov 21, 2016 2:27 pm
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?

Re: unable to create new users on Nagios Log Server

Posted: Wed Nov 23, 2016 12:16 am
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.

Re: unable to create new users on Nagios Log Server

Posted: Wed Nov 23, 2016 11:08 am
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"}'

Re: unable to create new users on Nagios Log Server

Posted: Wed Nov 23, 2016 10:41 pm
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?

Re: unable to create new users on Nagios Log Server

Posted: Mon Nov 28, 2016 1:52 pm
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/

Re: unable to create new users on Nagios Log Server

Posted: Wed Nov 30, 2016 6:58 pm
Thank you for your assistance.

I will wait for the Bug file update and hope it gets resolved soon. :)

Re: unable to create new users on Nagios Log Server

Posted: Thu Dec 01, 2016 1:50 pm
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.