Page 1 of 1

Add user in cli

Posted: Tue Jan 10, 2017 11:48 am
by TEWLS
Is there a way to redisplay the initial setup page or add a user in cli?

Re: Add user in cli

Posted: Tue Jan 10, 2017 11:58 am
by mcapra
To add a user from the CLI:

Code: Select all

curl -XPUT 'http://localhost:9200/nagioslogserver/user/99' -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: Add user in cli

Posted: Tue Jan 10, 2017 12:07 pm
by TEWLS
Awesome, ty that replaced the missing default user.

EDIT: This can be locked

Re: Add user in cli

Posted: Tue Jan 10, 2017 12:11 pm
by dwhitfield
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!