A new Flexera Community experience is coming on November 25th. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to create new device roles?

Hi

Something weird happened in FNMS

I've found a new possible role in the list that should not be there. Maybe some other user of FNMS has been able in some way to create it, so now for inventored targets it is possible to apply this new role.

Since I was thinking is not possible to create new roles, I'm wondering how this happened and if it is possible in some way to create new roles in FNMS.

Thanks

(1) Solution

@marcog,

(Always take a backup before running any deletions!)

1) Use the following SQL to find out the ComplianceComputerRoleID associated with the bad role:

SELECT * FROM ComplianceComputerRole

2) Use the following SQL to ensure that there are no inventory devices that are currently using this bad role:

SELECT * FROM ComplianceComputer WHERE ComplianceComputerRoleID = <ID from previous step>

3) Assuming 0 results from step 2, simply use:

DELETE FROM ComplianceComputerRole WHERE ComplianceComputerRoleID = <ID from step 1>

If you got > 0 results in step 2, then please assign a correct role to those machines before removing the bad role.

If my response answered your question satisfactorily, please click "ACCEPT AS SOLUTION" to heighten visibility for future customers!

View solution in original post

(11) Replies

Hi @marcog ,

Can you be more specific, because you are talking of 2 separate things and I'm a little bit lost.

A role is when you created customize access to a user, like you create a role that have access only to inventory, and to a specific corporate unit, etc.

Roles can be created only with administrative rights.

Then you speak about targets, targets are related to inventory, etc. With a specific role you can have access or not to targets.

So where is your problem, some one created a new list of targets? 

Hi @marcog,

Are you perhaps referring to 'device role' on an inventory device object?

These can be created by business adapter imports, or by direct updates to the table ComplianceComputerRole. I would say that the former is more likely.

From my test environment, seems that there are 8 OOTB device roles, as pictured below. Do you have more than that?

 

Roles.PNG

 

 

 

 

HTH,

Joseph

If my response answered your question satisfactorily, please click "ACCEPT AS SOLUTION" to heighten visibility for future customers!
Hi jjensen,
yes, I'm talking about device roles.
yes I have one more.
so maybe someone is importing devices using the business adapter using a wrong name. Thanks for clarifying.
So now the question is, how can I delete the wrongly created Role, since it should not be there and should not be selectable?
Thanks

@marcog,

(Always take a backup before running any deletions!)

1) Use the following SQL to find out the ComplianceComputerRoleID associated with the bad role:

SELECT * FROM ComplianceComputerRole

2) Use the following SQL to ensure that there are no inventory devices that are currently using this bad role:

SELECT * FROM ComplianceComputer WHERE ComplianceComputerRoleID = <ID from previous step>

3) Assuming 0 results from step 2, simply use:

DELETE FROM ComplianceComputerRole WHERE ComplianceComputerRoleID = <ID from step 1>

If you got > 0 results in step 2, then please assign a correct role to those machines before removing the bad role.

If my response answered your question satisfactorily, please click "ACCEPT AS SOLUTION" to heighten visibility for future customers!

Thank you, much appreciated

I suppose, using an insert on ComplianceComputerRoleID it's possible to directly create new roles. Am I right?

@marcog, I just tried in my test environment using:

INSERT INTO ComplianceComputerRole (ResourceName, DefaultValue, ManageLicenses)
VALUES ('ComplianceComputerRole.NewRole', 'NewRole', 1)

...but received a FK constraint error: 

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ComplianceComputerRole_ResourceString". The conflict occurred in database "FNMSCompliance", table "dbo.ComplianceResourceString", column 'ResourceString'.

 ...so, I guess not. This makes sense, now that I think about it.

So, looks like your culprit was most likely a business adapter.

If my response answered your question satisfactorily, please click "ACCEPT AS SOLUTION" to heighten visibility for future customers!
Thanks, but this let come in my mind another question, so if I delete with steps you provided before, I'm leaving a foreign key somewhere that maybe need to be deleted too?
Additionally, If community administrator can, please change the title of this thread, as Adrian was suggesting this can be confusing for people reading it.

@marcog - I have changed the subject on the first message in this thread to explicitly refer to device roles.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Hi,

I can confirm that via business adapter you can created new roles in inventory part.