Importing users from Core -> XI migration
-
- Posts: 31
- Joined: Mon Mar 22, 2021 12:57 pm
Importing users from Core -> XI migration
Hello,
We're 99% through the migration from Core to XI and I am wondering if there's a way to import the users and their privileges from the old Core install?
We have helpdesk users that need to be able to login and ack/disable alerts, as well as users that log in to view the status of things, in addition to the normal admin based users. I'm not sure where the userbase is stored in Core as I was sort of handed this project and am learning as I go. The only thing I can seem to find is the contacts, which migrated, but any users that need access to the XI I've created manually for testing.
Thanks!
We're 99% through the migration from Core to XI and I am wondering if there's a way to import the users and their privileges from the old Core install?
We have helpdesk users that need to be able to login and ack/disable alerts, as well as users that log in to view the status of things, in addition to the normal admin based users. I'm not sure where the userbase is stored in Core as I was sort of handed this project and am learning as I go. The only thing I can seem to find is the contacts, which migrated, but any users that need access to the XI I've created manually for testing.
Thanks!
Re: Importing users from Core -> XI migration
Hello @aylesworth
Thanks for reaching out, the core User Accounts are maintained in htpasswd and unfortunately, we do not currently have any way to import from htpasswd.
I see that there has already been a feature request for this added.
Thanks,
Perry
Thanks for reaching out, the core User Accounts are maintained in htpasswd and unfortunately, we do not currently have any way to import from htpasswd.
I see that there has already been a feature request for this added.
Thanks,
Perry
-
- Posts: 31
- Joined: Mon Mar 22, 2021 12:57 pm
Re: Importing users from Core -> XI migration
Cool, thanks Perry.
Is there a specific file I can stare/compare on the Core system in order to manually input the user accounts/privs in XI?
Thanks!
Is there a specific file I can stare/compare on the Core system in order to manually input the user accounts/privs in XI?
Thanks!
Re: Importing users from Core -> XI migration
If all of the contacts imported you can view them in Configure > Core Config Manager > Contacts.
If you're specifically referring to the Core server, the best place would likely be the objects.cache file which shows the final calculated objects:
Then use that file in this command:
If you're specifically referring to the Core server, the best place would likely be the objects.cache file which shows the final calculated objects:
Code: Select all
find / -name objects.cache
Code: Select all
grep -zPo 'define contact (\{([^{}]++|(?1))*\})' /usr/local/nagios/var/objects.cache
-
- Posts: 31
- Joined: Mon Mar 22, 2021 12:57 pm
Re: Importing users from Core -> XI migration
Thanks,
The contacts/groups have been imported into XI, I'm looking for specifically users that are able to log into the Core system of old, is that defined by contacts or somewhere else?
I need to make sure that everyone that has login ability and admin ability on the old core system has the same privileges on the new system.
The contacts/groups have been imported into XI, I'm looking for specifically users that are able to log into the Core system of old, is that defined by contacts or somewhere else?
I need to make sure that everyone that has login ability and admin ability on the old core system has the same privileges on the new system.
Re: Importing users from Core -> XI migration
Hello @aylesworth
You can get a list of User's that able to login to the Nagios Core from the htpasswd
From the Nagios Core Web console > System (from the left column) > Configuration > Object Type: 'Contacts' and/or 'Contacts Groups' will provide a list as well. You can look through the archives to see if there were others that were logged in:
You will only be able to pull a list but no other data types will be available from the Nagios Core.
Thanks,
Perry
You can get a list of User's that able to login to the Nagios Core from the htpasswd
Code: Select all
cat /usr/local/nagios/etc/htpasswd.users
Code: Select all
grep -Eir 'contact' /usr/local/nagios/var/archives/* | awk -F "=" '{print $4}' | sort -u
Thanks,
Perry
-
- Posts: 31
- Joined: Mon Mar 22, 2021 12:57 pm
Re: Importing users from Core -> XI migration
Thanks Perry,
The hthpasswd file only lists the 'nagiosadmin' account, and running that grep command returns a small list but I'm not sure if it's correct as I don't see my user account present.
In trying to get into the contacts section on Core, I'm greeted with an error "It appears as though you do not have permission to view the configuration information you requested..." Is this list available via CLI somewhere as well? Currently users log in and are authed via LDAP on both core and XI, would there be a log somewhere of LDAP authentications that I could look at?
Thanks!
The hthpasswd file only lists the 'nagiosadmin' account, and running that grep command returns a small list but I'm not sure if it's correct as I don't see my user account present.
In trying to get into the contacts section on Core, I'm greeted with an error "It appears as though you do not have permission to view the configuration information you requested..." Is this list available via CLI somewhere as well? Currently users log in and are authed via LDAP on both core and XI, would there be a log somewhere of LDAP authentications that I could look at?
Thanks!
Re: Importing users from Core -> XI migration
Hello @aylesworth
Thanks for following up, the contacts are auth'ed off your Authentication server however we should see a list of contacts within your eventman.log.
Thanks,
Perry
Thanks for following up, the contacts are auth'ed off your Authentication server however we should see a list of contacts within your eventman.log.
Code: Select all
zcat /usr/local/nagiosxi/var/eventman.log-*.gz | grep -Ei 'contact'
Perry
-
- Posts: 31
- Joined: Mon Mar 22, 2021 12:57 pm
Re: Importing users from Core -> XI migration
Thanks Perry,
I'm looking for this info on the Core instance, the command seems to be for the XI box. Trying to compile a list of users that I need to create on the XI side based on previous logins to the core UI.
Thanks!
I'm looking for this info on the Core instance, the command seems to be for the XI box. Trying to compile a list of users that I need to create on the XI side based on previous logins to the core UI.
Thanks!
Re: Importing users from Core -> XI migration
Hello @aylesworth,
In a previous post on this thread we pointed out the that the Nagios Core stores User information in htpasswd. On the core you can look through the nagios logs to get a list of contacts associated with checks; here is an example:
Thanks,
Perry
In a previous post on this thread we pointed out the that the Nagios Core stores User information in htpasswd. On the core you can look through the nagios logs to get a list of contacts associated with checks; here is an example:
Get a list:wproc: host=localhost; service=Root Partition; contact=nagiosadmin
Code: Select all
less /usr/local/nagios/var/archives/*.log | grep -Ei 'contact' | awk -F "contact=" '{print $2}' | sort -u
Perry