Page 1 of 1
Unable to create user out of XI web UI
Posted: Mon Sep 28, 2015 5:18 am
by karthek
Hi,
I'm trying to create a user out of xi web, but couldn't figure out a way. Steps i did:
1) added the user
Code: Select all
htpasswd /usr/local/nagiosxi/etc/htpasswd.users test.nagios
2) added the read only authorization in cgi.cfg file
Code: Select all
authorized_for_read_only=test.nagios
3) Created a contact file contacts.cfg in static folder.
Code: Select all
define contact {
contact_name test.nagios
alias tn
host_notification_period test_notification_times
service_notification_period test_notification_times
host_notification_options d,u,r,f,s
service_notification_options w,u,c,r,f,s
email [email protected]
use xi_contact_generic
}
4) restarted apache
everything runs without any errors, but the user doesn't show up in xi interface
am i missing something here?
Re: Unable to create user out of XI web UI
Posted: Mon Sep 28, 2015 9:35 am
by tmcdonald
Users in XI are very different from Contacts, which is what you have just made. To make an XI User, simply go to Admin -> Manage Users. It will make the associated contact and all the changes that go with it, so I would undo the changes you listed here.
https://assets.nagios.com/downloads/nag ... ntacts.pdf
Re: Unable to create user out of XI web UI
Posted: Tue Sep 29, 2015 12:24 am
by karthek
tmcdonald wrote:To make an XI User, simply go to Admin -> Manage Users.
I do not want to create user from the xi interface. Is there a option to create by editing config files?
Re: Unable to create user out of XI web UI
Posted: Tue Sep 29, 2015 11:37 am
by lmiltchev
I do not want to create user from the xi interface. Is there a option to create by editing config files?
This is not possible as there are no configs for the "xi users". This info is in the database. It used to be in postgresql. Now (on new installs anyway) it is in the mysql. We don't recommend modifying stuff directly in the database, so if you decide to go this route, you would be on your own as this is not going to be a supported instance.
Re: Unable to create user out of XI web UI
Posted: Wed Sep 30, 2015 12:45 am
by karthek
Thank you lmiltchev for the confirmation.
You may lock the thread.
#######EDIT#########
I was able to successfully add the user in ps DB and the user shows up in xi console

, but the only problem is the user is not able to login

.
what i found is basically the user doesn't have any authorizations to login. (see attached screenshot)
user.JPG
How do i provide the required rights?
note:I have added the user in htpasswd.users file as well and added to read only users in cgi.cfg
I totally understand this is not officially supported, but what we are doing is just for testing purpose in test env.
Re: Unable to create user out of XI web UI
Posted: Wed Sep 30, 2015 1:15 pm
by jomann
You won't be able to log in because the password is a hash that is saved in the database - it doesn't use the local system users for the web interface.
The officially supported way would be to create the user inside XI and uncheck the "Create as monitoring contact" checkbox which will not set up the user in core or the system itself it basically just creates the DB entry and lets them long in along with setting the permissions (user or admin). You can then manage the monitoring contacts from there.
Re: Unable to create user out of XI web UI
Posted: Thu Oct 01, 2015 6:09 am
by karthek
jomann wrote:You won't be able to log in because the password is a hash that is saved in the database
Thank you for that piece of information, i have added a hash value of a test password and the user is able to login successfully.
Now there are only few things that i need to add/set.
force the user for password change. Any idea where this flag can be set in db/config files?
I have given the permissions to view all the hosts and services to the user in the cgi.cfg file and yet user is not able to see any hosts/services. Any suggestions what else needs to be done?
Re: Unable to create user out of XI web UI
Posted: Thu Oct 01, 2015 1:40 pm
by jomann
Unfortunately the rest of this is outside the scope of our support. If you'd like to proceed you'll have to look through and find out what you want to add yourself -- we won't be able to support this method of adding users.
Re: Unable to create user out of XI web UI
Posted: Mon Oct 05, 2015 12:20 am
by karthek
Well, I'll try to find a way then.
Thank you for your support. You may lock the thread.