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
Bulk User Creation
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Bulk User Creation
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
It's not up on our internal QA board though, so Q1 may not happen.around Q1 2018
Re: Bulk User Creation
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.
Re: Bulk User Creation
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.
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.
Re: Bulk User Creation
Thanks!
I accept the risks associated with trying this out. We'll try on a dev box for sure. This is a huge help!
I accept the risks associated with trying this out. We'll try on a dev box for sure. This is a huge help!
Re: Bulk User Creation
Glad to help! 
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.