Page 2 of 2
Re: Unable to create AD users via API
Posted: Tue Jul 31, 2018 2:18 pm
by hbouma
Thank you.
Unfortunately, we cannot allow users to have any way to log in locally, so the work around will not work for us. I guess I will have to manually add the few hundred users myself.
Re: Unable to create AD users via API
Posted: Tue Jul 31, 2018 3:22 pm
by jwilli89
When is the next release of Fusion expected - that will include fix for this issue?
Re: Unable to create AD users via API
Posted: Tue Jul 31, 2018 4:35 pm
by lmiltchev
The next release of Fusion should be released soon, but you won't need to wait. I have a workaround for you (for the second issue). Create a backup of the
/usr/local/nagiosfusion/html/includes/utils/users.inc.php file. Open the original file in a text editor and change the following section of code (around line 160) from this:
Code: Select all
// check if this user is set to skip_local auth
$skip_local = (bool) get_user_attr('skip_local', $user_id);
// always allow nagiosadmin to login via local
if ($skip_local && /*$user_id != 1 &&*/ $username != 'nagiosadmin') {
$debug[] = CHECKCRED_FAILED_SKIPLOCAL;
$error = $default_error;
return false;
}
to this:
Code: Select all
// check if this user is set to skip_local auth
$skip_local = (bool) get_user_attr('skip_local', $user_id);
$allow_local = get_user_meta('allow_local', $user_id, 0);
// always allow nagiosadmin to login via local
if (($skip_local || !$allow_local) && $username != 'nagiosadmin') {
$debug[] = CHECKCRED_FAILED_SKIPLOCAL;
$error = $default_error;
return false;
}
Basically, you will be adding one line and modifying another one.
Let us know if this helped.