Page 1 of 1
login user gone??
Posted: Wed Jan 21, 2015 9:34 am
by itsupport_sgp
Hi,
I have just added a new nagios log server instance and after rebooting both instance, I'm not able to login anymore.
It says users do not exist??
Have tried the default 'nagiosadmin' account and it is not working too.
Any help would be appreciated.
Thanks.
Re: login user gone??
Posted: Wed Jan 21, 2015 11:43 am
by lmiltchev
You can try resetting the nagiosadmin password by running in the CLI:
Code: Select all
cd /usr/local/nagioslogserver/scripts
./reset_nagiosadmin_password.sh -p <your new password>
where you substitute the <your new password> with your actual password. Let me know if this helped.
Re: login user gone??
Posted: Wed Jan 21, 2015 10:53 pm
by itsupport_sgp
lmiltchev wrote:You can try resetting the nagiosadmin password by running in the CLI:
Code: Select all
cd /usr/local/nagioslogserver/scripts
./reset_nagiosadmin_password.sh -p <your new password>
where you substitute the <your new password> with your actual password. Let me know if this helped.
Hi,
It seems like even the nagiosadmin userid is gone as it says 'The username specified does not exist.'
It is not working even after doing the password reset.
Any ideas on how to create an userid via the CLI?
Thanks.
Re: login user gone??
Posted: Thu Jan 22, 2015 3:49 pm
by scottwilkerson
Can you execute the following from the CLI and see if any users exist
Code: Select all
curl "http://localhost:9200/nagioslogserver/user/_search?pretty"
Re: login user gone??
Posted: Thu Jan 22, 2015 11:48 pm
by itsupport_sgp
scottwilkerson wrote:Can you execute the following from the CLI and see if any users exist
Code: Select all
curl "http://localhost:9200/nagioslogserver/user/_search?pretty"
User not found.
[root@sgpnagioslog1 nagioslogserver]# curl "
http://localhost/nagioslogserver/user/_ ... agiosadmin"
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /nagioslogserver/user/_search was not found on this server.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at localhost Port 80</address>
</body></html>
Re: login user gone??
Posted: Fri Jan 23, 2015 10:11 am
by tgriep
Can you run this command exactly like it is and post the results?
Code: Select all
curl "http://localhost:9200/nagioslogserver/user/_search?pretty"
Re: login user gone??
Posted: Fri Jan 23, 2015 10:34 am
by itsupport_sgp
tgriep wrote:Can you run this command exactly like it is and post the results?
Code: Select all
curl "http://localhost:9200/nagioslogserver/user/_search?pretty"
[root@sgpnagioslog1 ~]# curl "
http://localhost:9200/nagioslogserver/u ... rch?pretty"
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
Re: login user gone??
Posted: Fri Jan 23, 2015 11:13 am
by tmcdonald
Run this from the CLI as root exactly as written, with the newline after "-d":
Code: Select all
curl -XPUT 'http://localhost:9200/nagioslogserver/user/2' -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"}'
This will create a user named "someuser" with the password "nagiosls". You can use this account to log in and optionally create the accounts that you need, then delete the "someuser" account as one of the other users when done.
Re: login user gone??
Posted: Sat Jan 24, 2015 12:47 am
by riconeo
Great tip!
Issue resolved now.
However, I still don't get it why the accounts are gone by itself.
