Page 1 of 1

NLS Unable to log in

Posted: Thu Jan 18, 2018 2:19 pm
by mquibell
I've just installed an 60-day eval of NLS. It was not easy. After fixing several fullinstall errors, I got it to finally succeed in installing. Now I can't log in. I see the users I create with

curl -XPOST 'http://localhost:9200/nagioslogserver/user/' -d '{"username":"someuser","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"user@example.com","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2015-01-23 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default"}'

in the database, but it always tells me invalid password. Help meh!

TIA!

Re: NLS Unable to log in

Posted: Thu Jan 18, 2018 2:51 pm
by tmcdonald
What OS and version are you installing on, and is it a fresh OS install? We officially support CentOS and RedHat versions 6 and 7 for the latest Nagios Log Server. Any other OS in unsupported at this time, and previous modifications to the system can cause issues, typically if a security team locks down sudoers or configured selinux too tightly.

Re: NLS Unable to log in

Posted: Thu Jan 18, 2018 4:48 pm
by mquibell
Hello sir,
The server is CentOS, release 6.3 (Final). It is not locked down to sudoer use only, for example. Thanks!

Also, when I went into the web gui and "Finished installation" by creating a username and all that, it said "Please wait..." for about 30 mins, so I restarted the host.

Re: NLS Unable to log in

Posted: Thu Jan 18, 2018 5:34 pm
by mquibell
FYI, it recognizes the username I create, just not the password.

Re: NLS Unable to log in

Posted: Thu Jan 18, 2018 5:45 pm
by mquibell
# curl -XGET 'http://localhost:9200/nagioslogserver/_ ... ser&pretty'
{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 2,
"max_score" : 1.0,
"hits" : [ {
"_index" : "nagioslogserver",
"_type" : "user",
"_id" : "2",
"_score" : 1.0,
"_source":{"username":"nagiosadmin","anotherpassword":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"user@mail.com","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2018-01-18 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default","forgotten_password_code":"651720020f1c4cd1b09f807df2a83b455431a872f1cd6ebcb1414d816463f2d9","forgotten_password_time":1516302198}
}, {
"_index" : "nagioslogserver",
"_type" : "user",
"_id" : "AWEKqVUrbh02-23pPlHM",
"_score" : 1.0,
"_source":{"username":"someuser","passwordhere":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"user@example.com","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2015-01-23 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default"}
} ]
}
}

Re: NLS Unable to log in

Posted: Fri Jan 19, 2018 1:49 pm
by npolovenko
@mquibell, Your command is going to work if you insert 2 after /user/. Like this:

Code: Select all

curl -XPOST 'http://localhost:9200/nagioslogserver/user/2' -d '{"username":"someuser","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"admin","email":"user@example.com","language":"default","apiaccess":"1","apikey":"1396e08757545557073844695e5b64caa0bd3ad3","created":"2015-01-23 10:00:00","created_by":0,"default_dashboard":"/dashboard/elasticsearch/default"}'

Re: NLS Unable to log in

Posted: Fri Jan 19, 2018 2:36 pm
by mquibell
Thanks, but I did that with the nagiosadmin account. You can see where ID=2. I tried creating another user, with .../user/1 and it recognizes the name, but not the password.

Re: NLS Unable to log in

Posted: Fri Jan 19, 2018 2:58 pm
by mquibell
I went back to creating the nagiosadmin account and then reset the password via the script. Works! Thanks!

Re: NLS Unable to log in

Posted: Fri Jan 19, 2018 3:01 pm
by npolovenko
@mquibell, Great! Do you have other questions for us or is it ok to lock this thread as resolved?