Bulk User Creation

This support forum board is for questions relating to Nagios Fusion.
Locked
TCBeekley
Posts: 20
Joined: Thu May 26, 2016 6:40 am

Bulk User Creation

Post by TCBeekley »

I have a couple hundred users to create in Fusion 4. Is there a shortcut? I don't mind scripting the input if the calls user.php are using to create the user are available. This would be helpful down the road to automate user creation as well.

Thanks!

Tim Beekley
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Bulk User Creation

Post by dwhitfield »

Are these users AD/LDAP users by chance? An AD/LDAP component is coming in Fusion 4.1. Unfortunately, I do not have an ETA on when that might be out except that the roadmap says
around Q1 2018
It's not up on our internal QA board though, so Q1 may not happen.
TCBeekley
Posts: 20
Joined: Thu May 26, 2016 6:40 am

Re: Bulk User Creation

Post by TCBeekley »

They are AD/LDAP, as they'll link to the AD/LDAP users we already have in Nagios XI. Would it be possible to get the SQL calls? I could script it, otherwise, we're looking at A LOT of hours to create the users, then re-create them when AD/LDAP integration comes on-line.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Bulk User Creation

Post by cdienger »

To connect to the databas:

mysql -ufusion -pfusion -Dfusion

and an example of adding a user:

INSERT INTO users (username, password, name, email, enabled, level) VALUES ("bob", "password", "Robert", "[email protected]", 1, 0);

The level0 is for a user and 1 is for an admin. There are additional functions for the other settings that can be found in /usr/local/nagiosfusion/html/includes/utils/users.inc.php if needed. I haven't had a chance to test them out.

Also, ***BIG WARNING***, modifying the database directly is not something we usually recommend and can be dangerous if not careful. The above was tested on a lab machine and minimally tested.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
TCBeekley
Posts: 20
Joined: Thu May 26, 2016 6:40 am

Re: Bulk User Creation

Post by TCBeekley »

Thanks!

I accept the risks associated with trying this out. We'll try on a dev box for sure. This is a huge help!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Bulk User Creation

Post by cdienger »

Glad to help! :)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked