Add user in cli

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
TEWLS
Posts: 33
Joined: Wed Dec 28, 2016 3:53 pm

Add user in cli

Post by TEWLS »

Is there a way to redisplay the initial setup page or add a user in cli?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Add user in cli

Post 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.
Former Nagios employee
https://www.mcapra.com/
TEWLS
Posts: 33
Joined: Wed Dec 28, 2016 3:53 pm

Re: Add user in cli

Post by TEWLS »

Awesome, ty that replaced the missing default user.

EDIT: This can be locked
Last edited by TEWLS on Tue Jan 10, 2017 12:17 pm, edited 1 time in total.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Add user in cli

Post by dwhitfield »

It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
Locked